Menu

Pebl2.1 IAT key functions

Leanna
2023-09-25
2023-10-03
  • Leanna

    Leanna - 2023-09-25

    Hello,

    I am a graduate student at the University of Central Oklahoma and I am working on my thesis doing a race IAT. Pebl2.1 thankfully has a IAT built into their script but unlike typical IAT where the key functions are "E" and "I" pebl uses "1" and "2" to signal the left and right side of their screen. My thesis advisor is super picky and will not let me move forward with running participants unless I change the keys to the original IAT form which is E and I. I am struggling miserably trying to figure this out so I am reaching out to see if someone has successfully changed the script? If so can you please help me.

     
  • Shane T Mueller

    Shane T Mueller - 2023-09-27

    To fix this, you just need to go into the IAT.pbl file using a text editor like notepad++.

    Change two lines (474 and 525)
    from:

    response <-  WaitForListKeyPress(["1","2"])
    
    to
    
    response <-  WaitForListKeyPress(["I","E"])
    

    and at line 482:

    if(ToNumber(lgoodness)==1)
    {
    corrResp <- 2
    } else {
    corrResp <- 1
    }

    to

    if(ToNumber(lgoodness)==1)
    {
    corrResp <- "I"
    } else {
    corrResp <- "E"
    }

    and
    if(type != lgoodness)
    {
    corrResp <- 1
    } else {
    corrResp <- 2
    }

    to

    if(type != lgoodness)
    {
    corrResp <- "E"
    } else {
    corrResp <- "I"
    }

    Note that these two are opposite codings of correct response.

    You will also need to change some text strings, which should be pretty straightforward (see line 386, change '1' to 'E') and do that throughout. Double-quotes " delimits a text string, so a single-quote iinside the text just shows up directly.

     
  • Shane T Mueller

    Shane T Mueller - 2023-09-27

    There are a couple additional tweaks needed to get the coding correct. See attached--this should work except for any additional instructions you may have added.

     
  • Leanna

    Leanna - 2023-09-28

    Thank You sooooo much Shane you are a HUGEEEE help. Now unfortunately my professor is wanting a practice trial to be at the beginning of the first trial? again I am stumped I wish I was better at C++ language. could you by any chance point me in the right direction on the syntax of how I would go about doing that? If that is too much to ask I completely understand :) and thanks for your swift response !

     
    • ashwinipn

      ashwinipn - 2023-10-02

      Hi Leanna,
      Since Shane has made all codes open source, you may use the IAT source
      codes to create your modified task. As I have not looked into the IAT
      specifically, I can't tell you what exactly to do. But you may try figuring
      out how the number of trials and its stimuli have been specified in the
      original code, use the same information at the beginning, and change the
      number of trials and stimuli type for the practice. Of course,
      differentiating instructions between practice and actual task will also be
      made part of.
      Hope this helps.

      Best,

      Ashwini

      On Thu, Sep 28, 2023 at 2:08 PM Leanna lbell15@users.sourceforge.net
      wrote:

      Thank You sooooo much Shane you are a HUGEEEE help. Now unfortunately my
      professor is wanting a practice trial to be at the beginning of the first
      trial? again I am stumped I wish I was better at C++ language. could you by
      any chance point me in the right direction on the syntax of how I would go
      about doing that? If that is too much to ask I completely understand :) and
      thanks for your swift response !


      Pebl2.1 IAT key functions
      https://sourceforge.net/p/pebl/discussion/281129/thread/7d2c7a1ef8/?limit=25#49e0


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pebl/discussion/281129/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
    • Shane T Mueller

      Shane T Mueller - 2023-10-03

      BTW, this isn't C++.

      You can hard-code trials by either calling 'MismatchTrial()' or 'MatchTrial()'. Assuming you want a couple match trials at the beginning of a block, you can pick a random row from the stimulus table stimAll and use that. These get recorded to the data file so you need to print the first columns of the CSV too. The following code will handle it:

        ## do a practice trial
        i <- Sample(stimAll)
        FilePrint_(gFileOut, gSubNum + ",Practice,0,")
        MatchTrial(First(i), Nth(i,2),Nth(i,3),Nth(i,4))   
      

      or

        ## do a practice trial
        i <- Sample(stimAll)
        FilePrint_(gFileOut, gSubNum + ",Practice,0,")
        MisMatchTrial(First(i), Nth(i,2),Nth(i,3),Nth(i,4))   
      

      If you open the IAT.pbl file, put one of these at the beginning of the block you care about, right before the loop(i,stimAll). Note block 4 and 5 used mismatch and 1-2- 3 used MatchTrial. If you want more practice, copy the code multiple times. These will just appear as extra trials and the block will start immediately.

       

Log in to post a comment.

MongoDB Logo MongoDB