Thanks for your help! I think I have it all figured out now, but I just have a few clarification/confirmation questions.
- 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?
- 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.
- 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>