Setting new variables


Setting new variables

Author
Message
Fabiana
Fabiana
Associate Member
Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)

Group: Forum Members
Posts: 12, Visits: 62
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.
 
Dave
Dave
Supreme Being
Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)

Group: Administrators
Posts: 9.7K, Visits: 45K
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.
 

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>





Fabiana
Fabiana
Associate Member
Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)Associate Member (284 reputation)

Group: Forum Members
Posts: 12, Visits: 62
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>



Dave
Dave
Supreme Being
Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)Supreme Being (665K reputation)

Group: Administrators
Posts: 9.7K, Visits: 45K
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>



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.


GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search