By Fabiana - 5/25/2019
Hello,
I am currently working on a cross-cultural Old/New Face Recognition Task, I'd like to know how to set new variables to easily read the data once the experiment is completed. I need to code the gender of the presented stimuli, their ethnicity and if the stimuli were familiar or unfamiliar. I also have to code the participant's gender and ethnicity.
I tried to set those variables on <values> and then with the /ontrialend attribute, but I am struggling to understand how to code to have them in my data file.
|
By Dave - 5/26/2019
+xHello, I am currently working on a cross-cultural Old/New Face Recognition Task, I'd like to know how to set new variables to easily read the data once the experiment is completed. I need to code the gender of the presented stimuli, their ethnicity and if the stimuli were familiar or unfamiliar. I also have to code the participant's gender and ethnicity. I tried to set those variables on <values> and then with the /ontrialend attribute, but I am struggling to understand how to code to have them in my data file. Assuming you've managed to set the values you created properly, then all you need to log them is to specify them in your <data> element's /columns:
<values> / gender = "" / ethnicity = "" </values>
<block exampleblock> / trials = [1-4 = exampletrial] </block>
<trial exampletrial> / ontrialend = [ values.gender = list.gender.nextvalue; values.ethnicity = list.ethnicity.nextvalue; ] / stimulusframes = [1=examplestimulus] / validresponse = (57) </trial>
<text examplestimulus> / items = exampleitems / select = noreplace </text>
<item exampleitems> / 1 = "Face A (black male)" / 2 = "Face B (black female)" / 3 = "Face C (white male)" / 4 = "Face D (white female)" </item>
<list gender> / items = ("male", "female", "male", "female") / selectionmode = text.examplestimulus.currentindex </list>
<list ethnicity> / items = ("black", "black", "white", "white") / selectionmode = text.examplestimulus.currentindex </list>
<data> / columns = [date time subject group blocknum blockcode trialnum trialcode stimulusitem response latency correct values.gender values.ethnicity] / separatefiles = true </data>
|
By Fabiana - 5/28/2019
Thank you for the response, it really helped me. But I think I didn't assign the values in the proper way because in the output file it returns only female Asian for all the stimuli.
<values> /gender=1 /ethnicity=1 <values>
|
By Dave - 5/28/2019
+xThank you for the response, it really helped me. But I think I didn't assign the values in the proper way because in the output file it returns only female Asian for all the stimuli. <values> /gender=1 /ethnicity=1 <values> The <values> element you posted is not the relevant part. You need to make sure you have the <list> elements and /ontrialend logic down correctly:
<values> / gender = "" / ethnicity = "" </values>
<block exampleblock> / trials = [1-4 = exampletrial] </block>
<trial exampletrial> / ontrialend = [ values.gender = list.gender.nextvalue; values.ethnicity = list.ethnicity.nextvalue; ] / stimulusframes = [1=examplestimulus] / validresponse = (57) </trial>
<text examplestimulus> / items = exampleitems / select = noreplace </text>
<item exampleitems> / 1 = "Face A (black male)" / 2 = "Face B (black female)" / 3 = "Face C (white male)" / 4 = "Face D (white female)" </item>
<list gender> / items = ("male", "female", "male", "female") / selectionmode = text.examplestimulus.currentindex </list>
<list ethnicity> / items = ("black", "black", "white", "white") / selectionmode = text.examplestimulus.currentindex </list>
<data> / columns = [date time subject group blocknum blockcode trialnum trialcode stimulusitem response latency correct values.gender values.ethnicity] / separatefiles = true </data>
The list elements need to be paired to the face stimulus (cf. https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htm). Double check that part in your script and make sure it's correct.
|
|