Multiple sets of items and instructions within set


Author
Message
Jeff
Jeff
Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)
Group: Forum Members
Posts: 49, Visits: 123

No offense taken.  "I'd rather be lucky than good".  [:D]


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K



  1. Randomly select a question for each trial (currently, via the item counter.  I just looked at the help, and I think I should be using selectionrate=trial instead of always)



Yes. Note that '/selectionrate = trial' is what a counter defaults to.



  • Call all of the relevant stimuli related to this question (4 pictures, 2 sounds, currently via the current(items) mechanism), plus the correct response (currently via the second counter).  This is the part that I am most unclear about.  After Inquisit randomly selects a question from the item counter, how do I call all of the relevant stimuli from the picture/sound elements?  What I've done works, but you seem to be indicating that my strategy is misguided.


  • Yes, what you've done works (at least looks like it), but it does so by accident rather than by good design (no offense). Several more straightforward / clearer strategies:


    - Simply have all of the various stimulus elements (<picture>, <sound>, etc.) reference the counter directly in their /select attributes (/select = items). The counter will supply one value (i.e., here: item index #) per trial (see above), all elements will thus retrieve the correct item set.


    - Alternatively keep your /ontrialbegin statement and use values.item in /select (/select = values.item)



  • If the question is one of the first X questions, use more audio instructions to help the children understand the task.  After that, eliminate those additional instructions.


  • Your different trial elements take care of that. The practice trials display those sounds, etc., the test trials don't.


    Regards,


    ~Dave


    Jeff
    Jeff
    Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)
    Group: Forum Members
    Posts: 49, Visits: 123

    First of all, Dave, you are awesome. Thanks for your help.



    My goals:




    1. Randomly select a question for each trial (currently, via the item counter.  I just looked at the help, and I think I should be using selectionrate=trial instead of always)

    2. Call all of the relevant stimuli related to this question (4 pictures, 2 sounds, currently via the current(items) mechanism), plus the correct response (currently via the second counter).  This is the part that I am most unclear about.  After Inquisit randomly selects a question from the item counter, how do I call all of the relevant stimuli from the picture/sound elements?  What I've done works, but you seem to be indicating that my strategy is misguided.

    3. If the question is one of the first X questions, use more audio instructions to help the children understand the task.  After that, eliminate those additional instructions.


    Best regards, 


    Jeff




    Dave
    Dave
    Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
    Group: Administrators
    Posts: 13K, Visits: 104K

    Depends on what you want the code to do -- which is not obvious from your script. For the record:


    / ontrialbegin = [values.item=counter.items.selectedvalue; ...]


    will sample a value from the counter and store it in values.item. values.item, though, is never actually used for anything in the script. The respective counter is set to '/ selectionrate = always' for reasons unclear to me. You'd need that setting if you wanted to pull several *different* values from said counter in a single trial. The various <picture> elements reference the counter as a dependency via '/select = current(items)', the intention of which also remains unclear to me.


    Regards,


    ~Dave


    Jeff
    Jeff
    Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)
    Group: Forum Members
    Posts: 49, Visits: 123

    Well, I guess I don't know how to fix it the correct way.  Using values.items fixed the issue so I went with that.  If there's a better way, I would love to hear it.


    Dave
    Dave
    Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
    Group: Administrators
    Posts: 13K, Visits: 104K

    / ontrialbegin[picture.PK2_1_LL_pic.item.1 = counter.items.selectedvalue] (the first picture),


    Is also broken. It means you try to set a numerical value pulled from the counter as the first item in the picture element.


    Dave
    Dave
    Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
    Group: Administrators
    Posts: 13K, Visits: 104K

    / ontrialbegin[picture.PK2_1_LL_pic.item.1 = counter.items.selectedvalue] (the first picture),


    Well, that's completely broken syntax.


    Jeff
    Jeff
    Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)
    Group: Forum Members
    Posts: 49, Visits: 123


     jmwotw:

    Since I am randomly selecting items from the item counter using the ontrialbegin attribute (I think this is coded correctly), should every other select statement reference the item counter (other counters, picture and sound elements)?  Before I had to create a chain, where the first picture was selected randomly, the second was chained to the first, the third to the second, and so on.



    I don't see for what purpose you'd need values.items anyway. You're not using it anywhere.




    Sorry about the posting script in the message body.  I didn't see the forum option to post a file.  Thanks for the info.  Anyway, I used values.items because I didn't know what else to use to select the next item from the item counter.  When I used


    / ontrialbegin[picture.PK2_1_LL_pic.item.1 = counter.items.selectedvalue] (the first picture),


    I kept getting "Unable to initialize picture PK2_1_LL_pic" message.  When I removed the ontrialbegin attribute altogether, it never iterated to the next item.


    Dave
    Dave
    Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
    Group: Administrators
    Posts: 13K, Visits: 104K

    In my item counter section, I list all of the items (reduced here to 4 for brevity).  Should the reset interval equal the total number of items, or if I am only administering a subset of the items, should I set it to the total number of items in the subset?


    Inquisit will automatically (have to) reset a counter (or other item pool) when it runs out of unsampled items. That's not what resetinterval is for. Here's what it's for: By default, Inquisit will reset all selection pools at the beginning of a new <block>. /resetinterval lets you override this, so you can e.g. draw from the *same* pool without replacement across multiple blocks without replacement (which is what you asked for -- draw from the same set of items in practice and test blocks, without replacement).


    Since I am randomly selecting items from the item counter using the ontrialbegin attribute (I think this is coded correctly), should every other select statement reference the item counter (other counters, picture and sound elements)?  Before I had to create a chain, where the first picture was selected randomly, the second was chained to the first, the third to the second, and so on.


    I don't see for what purpose you'd need values.items anyway. You're not using it anywhere.


    This is a 4-item multiple choice task. In order to dynamically assign the correct response, I used another counter variable, tied to the first one, that indicated the correct response with a numeric value between 1-4.  However, since the response is text-based, I had to translate the numeric values to text using an expression before evaluating the response using the iscorrectresponse attribute in the trial section.  Is this a good strategy?


    You also could have the <counter> return the strings directly. Counters aren't limited to numeric values.


    Regards,


    ~Dave


    P.S.: Please consider using the forum's file attachment facility (-> 'Options' tab) instead of pasting lengthy scripts into the message body (doing so does not serve readability well). Thanks.


    Jeff
    Jeff
    Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)
    Group: Forum Members
    Posts: 49, Visits: 123


    Thanks for your help!  I think I have it all figured out now, but I just have a few clarification/confirmation questions.




    1. In my item counter section, I list all of the items (reduced here to 4 for brevity).  Should the reset interval equal the total number of items, or if I am only administering a subset of the items, should I set it to the total number of items in the subset?

    2. Since I am randomly selecting items from the item counter using the ontrialbegin attribute (I think this is coded correctly), should every other select statement reference the item counter (other counters, picture and sound elements)?  Before I had to create a chain, where the first picture was selected randomly, the second was chained to the first, the third to the second, and so on.

    3. This is a 4-item multiple choice task. In order to dynamically assign the correct response, I used another counter variable, tied to the first one, that indicated the correct response with a numeric value between 1-4.  However, since the response is text-based, I had to translate the numeric values to text using an expression before evaluating the response using the iscorrectresponse attribute in the trial section.  Is this a good strategy?



    Thanks again everyone...even though it's confusing sometimes, I love the flexibility of this program!  These latest changes have reduced my code by about 75%!  Boo-yah!



    Best regards,


    Jeff



    **************************************************************************************************************


    COUNTER


    **************************************************************************************************************


    <counter items>


    / select = noreplace


    / selectionrate = always


    / items = (1, 2, 3, 4)


    / resetinterval = 4


    </counter>



    <counter items_correct>


     /items = (4, 4, 1, 3)


    / select = current(items)


    </counter>



    **************************************************************************************************************


    VALUES


    **************************************************************************************************************


    <values>


    /items=0


    /correct=0


    /correctt = " "


    </values>



    **************************************************************************************************************


    EXPRESSIONS


    **************************************************************************************************************


    <expressions>


    /correct_exp = 


        if (values.correct == 1) values.correctt = "PK2_1_UL_pic";


        if (values.correct == 2) values.correctt = "PK2_1_UR_pic";


        if (values.correct == 3) values.correctt = "PK2_1_LL_pic";


        if (values.correct == 4) values.correctt = "PK2_1_LR_pic";



    </expressions>


    ******************************************************************************************************************


    PICTURE  &  SOUND  SECTIONS   


    Each Trial type has a set of four pictures in different positions to specify below.


    ****************************************************************************************************************** 



    <picture PK2_1_LL_pic>


    / items = PK2_1_LL


    / select = current(items)


    / position = (25, 75)


    / size = (40%, 40%)


    </picture>



    <picture PK2_1_LR_pic>


    / items = PK2_1_LR


    / select = current(items)


    / position = (75, 75)


    / size = (40%, 40%)


    </picture>



    <picture PK2_1_UL_pic>


    / items = PK2_1_UL


    / select = current(items)


    / position = (25, 25)


    / size = (40%, 40%)


    </picture>



    <picture PK2_1_UR_pic>


    / items = PK2_1_UR


    / select = current(items)


    / position = (75, 25)


    / size = (40%, 40%)


    </picture>



    <sound PK2_1_point_to_the_letter>


    / items = PK2_1_point_to_the_letters


    / select = current(items)


    </sound>



    <sound PK2_1_LN>


    / items = PK2_1_LNs


    / select = current(items)


    </sound>



    ******************************************************************************************************


             PICTURE ITEM SECTIONS   


    ****************************************************************************************************** 



     <item PK2_1_UL>


      / 1="ELNMC008D.jpg"


      / 2="ELNMC010C.jpg"


      / 3="ELNMC012A.jpg"


      / 4="ELNMC013D.jpg"


       </item>



     <item PK2_1_UR>


      / 1="ELNMC008B.jpg"


      / 2="ELNMC010D.jpg"


      / 3="ELNMC012D.jpg"


      / 4="ELNMC013B.jpg"


       </item>



     <item PK2_1_LL>


      / 1="ELNMC008C.jpg"


      / 2="ELNMC010B.jpg"


      / 3="ELNMC012C.jpg"


      / 4="ELNMC013A.jpg"


       </item>



     <item PK2_1_LR>


      / 1="ELNMC008A.jpg"


      / 2="ELNMC010A.jpg"


      / 3="ELNMC012B.jpg"


      / 4="ELNMC013C.jpg"


      </item>



     ******************************************************************************************************


                   AUDIO ITEM SECTIONS.  


    ******************************************************************************************************


     <item PK2_1_point_to_the_letters>


      / 1="point_to_the_letter_female1.wav"


      / 2="point_to_the_letter_female1.wav"


      / 3="point_to_the_letter_male2.wav"


      / 4="point_to_the_letter_female1.wav"


       </item>



     <item PK2_1_LNs>


      / 1="ELNMC008A1_F.wav"


      / 2="ELNMC010A2_F.wav"


      / 3="ELNMC012A2_M.wav"


      / 4="ELNMC013A2_F.wav"


    </item>



    ********************************  TRIAL SECTIONS   *************************************



     <trial PK2_1_Prac_trials>


    / ontrialbegin = [values.items = counter.items.selectedvalue; values.correct = counter.items_correct.selectedvalue]


    / ontrialbegin = [expressions.correct_exp]


    / inputdevice = mouse


    / iscorrectresponse = [trial.PK2_1_Prac_trials.response == values.correctt]


    / pretrialpause = 250


    / posttrialpause = 250


    / recorddata = true


    / correctmessage = true(PK2_1_right,1500)


    / errormessage = true(PK2_1_wrong,1500)


    / responsetrial = (diamond, pause)


    / validresponse = (diamond,


       PK2_1_LL_pic,


       PK2_1_LR_pic,


       PK2_1_UL_pic,


       PK2_1_UR_pic)


    / stimulustimes = [1=diamond, line_LF, line_RT, line_Top, line_Bottom;


       500 =        PK2_1_LL_pic,


                PK2_1_LR_pic,


                PK2_1_UL_pic,


                PK2_1_UR_pic;


       550 =       tones;


       600=      PK2_1_item_name;


       1750 =     PK2_1_point_to_the_letter;


       3400 =     PK2_1_LN]


    </trial>



    <trial PK2_1_Test_trials>


    / ontrialbegin = [values.items = counter.items.selectedvalue; values.correct = counter.items_correct.selectedvalue]


    / ontrialbegin = [expressions.correct_exp]


    / inputdevice = mouse


    / iscorrectresponse = [trial.PK2_1_Test_trials.response == values.correctt]


    / pretrialpause = 250


    / posttrialpause = 250


    / recorddata = true


    / correctmessage = true(PK2_1_right,1500)


    / errormessage = true(PK2_1_wrong,1500)


    / responsetrial = (diamond, pause)


    / validresponse = (diamond,


       PK2_1_LL_pic,


       PK2_1_LR_pic,   


       PK2_1_UL_pic,


       PK2_1_UR_pic)


    / stimulustimes = [1=diamond, line_LF, line_RT, line_Top, line_Bottom;


       500 =


          PK2_1_LL_pic,


          PK2_1_LR_pic,


          PK2_1_UL_pic,


          PK2_1_UR_pic;


       550 =       tones;


       600=      PK2_1_item_name;


       1900 =     PK2_1_LN]


    </trial>



    <trial pause>


       / inputdevice = mouse


       / validresponse = (continue)


       / correctmessage = false


       / errormessage = false


       / correctresponse = (continue)


       / pretrialpause = 0


       / posttrialpause = 0


       / recorddata = true


       / stimulustimes = [1=continue]


       </trial>



    *************************************************************************


      BLOCK SECTION. 


    *************************************************************************


    <block PK2_1_Prac_block>


       / trials = [1 - 4=noreplace(PK2_1_Prac_trials)]


       </block>



    <block PK2_1_Test_block>


       / trials = [1 - 7=noreplace(PK2_1_Test_trials)]


       </block>





    GO

    Merge Selected

    Merge into selected topic...



    Merge into merge target...



    Merge into a specific topic ID...




    Reading This Topic

    Explore
    Messages
    Mentions
    Search