Help With Complex Script Design


Author
Message
page-gould
page-gould
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 5, Visits: 1

I am having trouble writing a somewhat complex Inquisit script, and I am hoping that an Inquisit Guru out there will know exactly what I should do!


Background/Experiment Design: I would like to present participants with descriptions of 12 people.  There is one catch: I would like the participant's ethnic group to be represented in varying proportions among these 12 "people."  So, first participants complete a demographic page where they indicate their ethnicity, and then they are presented with the 12 person descriptions that each have an ethnic group attached to the description.  Based on the participant's experimental condition, they will see either 100% ethnic ingroup members, 75% ingroup members, 50% ingroup members, 25% ingroup members, and 0% ingroup members.


Code:











# First, need to obtain demographics to extract ethnic group




<dropdown sex>


/ caption = "Sex"


/ options = ("female","male")


</dropdown>


 


<dropdown ethnicity>


/ caption = "Ethnicity (Please choose one)"


/ options = ("East Asian","South Asian","White","Black","Middle Eastern","Latino","Multiracial")


/ optionvalues = ("1","2","3","4","5","6","7")


</dropdown>


 


<surveypage demographicspage>


/ caption = "Please begin by answering the following demographic questions:"


/ questions = [1=sex;2=ethnicity]


/ ontrialend = [if (dropdown.ethnicity == 1) item.outgroups.item = outgroups1; if (dropdown.ethnicity == 2) item.outgroups.item = outgroups2; if (dropdown.ethnicity== 3) item.outgroups.item = outgroups3 ; if (dropdown.ethnicity== 4) item.outgroups.item = outgroups4 ; if (dropdown.ethnicity== 5) item.outgroups.item = outgroups5 ; if (dropdown.ethnicity == 6) item.outgroups.item = outgroups6 ; if (dropdown.ethnicity == 7) item.outgroups.item = outgroups7]


</surveypage>


 


<survey demographics>


/ pages = [1=demographicspage]


</survey>


 


# Next, depending on ethnicity of participant, present person descriptors of which X are ingroup members


 


<text descriptions>


/ items = ("Description 1","Description 2","Description 3","Description 4","Description 5","Description 6","Description 7","Description 8","Description 9","Description 10","Description 11","Description 12")


/ select = noreplace


</text>


 


<text outgroups1>


/ items = ("South Asian","South Asian","South Asian","South Asian","South Asian","White","White","White","Black","Black","Multiracial","Middle Eastern")


/ select = noreplace


</text>


 


<text outgroups2>


/ items = ("East Asian","East Asian","East Asian","East Asian","East Asian","East Asian","White","White","White","Black","Black","Multiracial","Middle Eastern")


/ select = noreplace


</text>


 


<text outgroups3>


/ items = ("East Asian","East Asian","East Asian","East Asian","East Asian","South Asian","South Asian","South Asian","South Asian","Black","Multiracial","Middle Eastern")


/ select = noreplace


</text>


 


<text outgroups4>


/ items = ("East Asian","East Asian","East Asian","East Asian","South Asian","South Asian","South Asian","South Asian","White","White","Multiracial","Middle Eastern")


/ select = noreplace


</text>


 


<text outgroups5>


/ items = ("East Asian","East Asian","East Asian","East Asian","South Asian","South Asian","South Asian","South Asian","White","White","Black","Middle Eastern")


/ select = noreplace


</text>


 


<text outgroups6>


/ items = ("East Asian","East Asian","East Asian","East Asian","South Asian","South Asian","South Asian","South Asian","White","White","Black","Multiracial")


/ select = noreplace


</text>


 


<text outgroups7>


/ items = ("East Asian","East Asian","East Asian","East Asian","South Asian","South Asian","South Asian","South Asian","White","White","Black","Multiracial")


/ select = noreplace


</text>


 


<text ingroup>


/ items = ("ingroup = dropdown.ethnicity.option")


</text>


 


<item outgroups>


</item>


 


<text outgroupsfilled>


/ items = outgroups


</text>


 


<trial ingroup>


/ stimulustimes = [0=ingroup;100=descriptions]


/ response = anyresponse


</trial>


 


<trial outgroup>


/ stimulusframes = [0=outgroupsfilled;100=descriptions]


/ response = anyresponse


</trial>


 


<block ingroup100>


/ trials = [1-12=ingroup]


</block>


 


<block ingroup075>


/ trials = [1-12=noreplacenorepeat(ingroup,ingroup,ingroup,outgroup)]


</block>


 


<block ingroup050>


/ trials = [1-12=noreplacenorepeat(ingroup,ingroup,outgroup,outgroup)]


</block>


 


<block ingroup025>


/ trials = [1-12=noreplacenorepeat(ingroup,outgroup,outgroup,outgroup)]


</block>


 


<block ingroup000>


/ trials = [1-12=noreplacenorepeat(outgroup,outgroup,outgroup,outgroup)]


</block>


 


<expt>


/ subjects = (1 of 5)


/ blocks = [1=demographics;2=ingroup100]


</expt>


 


<expt>


/ subjects = (2 of 5)


/ blocks = [1=demographics;2=ingroup075]


</expt>


 


<expt>


/ subjects = (3 of 5)


/ blocks = [1=demographics;2=ingroup050]


</expt>


 


<expt>


/ subjects = (4 of 5)


/ blocks = [1=demographics;2=ingroup025]


</expt>


 


<expt>


/ subjects = (5 of 5)


/ blocks = [1=demographics;2=ingroup000]


</expt>







Error Message: "/stimulusframes: Event number must be greater than 0" associated with the "<trial outgroup>" object.  This makes me think that I am not correctly associating the outgroups text stimuli (e.g., outgroups1, outgroups2) with my "outgroups" item object.  Replacing the <surveypage demographicspage> block of code with the following does not help:










<surveypage demographicspage>


/ caption = "Please begin by answering the following demographic questions:"


/ questions = [1=sex;2=ethnicity]


/ ontrialend = [if (dropdown.ethnicity == 1) item.outgroups.item = text.outgroups1; if (dropdown.ethnicity == 2) item.outgroups.item = text.outgroups2; if (dropdown.ethnicity== 3) item.outgroups.item = text.outgroups3 ; if (dropdown.ethnicity== 4) item.outgroups.item = text.outgroups4 ; if (dropdown.ethnicity== 5) item.outgroups.item = text.outgroups5 ; if (dropdown.ethnicity == 6) item.outgroups.item = text.outgroups6 ; if (dropdown.ethnicity == 7) item.outgroups.item = text.outgroups7]


</surveypage>


Does anyone know what I am doing wrong, or if this is something that Inquisit can do?  Thank you in advance for your insight and help!






















seandr
seandr
Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)Supreme Being (144K reputation)
Group: Administrators
Posts: 1.3K, Visits: 5.6K

Hi Elizabeth,


I believe the problem is that you've specified the /stimulusframes command, which starts counting frames at 1 rather than 0, rather than the /stimulustimes command, which starts counting milliseconds at 0.


If you change /stimulusframes to /stimulustimes (as is used by <trial ingroup>), your script should compile just fine.


Regards,
Sean


page-gould
page-gould
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 5, Visits: 1

Thank you so much, Sean!  You hit the nail right on the head regarding the error code.  You rule!


I am now having trouble getting the participant-generated responses to be recorded as items, but I am actively working on it and will post the working code when I have it.  In the meanwhile, if anyone knows what I am doing wrong, I will definitely appreciate any guidance you can give.


Thank you!


page-gould
page-gould
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 5, Visits: 1

I wanted to follow up that I got the script to work in entirety (and to share the working code).  However, it should be noted that the Inquisit Documentation is incorrect in at least two ways: (1) The tutorial that demonstrates how to display participant-generated responses as stimuli has syntax errors; and, (2) There is a ".checked" property for dropdown objects that is not listed among the properties in the dropdown documentation.


Once that was figured out, though, the code works!  For anyone trying to do something similar, here it is:


----------


<dropdown sex>


/ caption = "Sex"


/ options = ("female","male")


</dropdown>


 


<dropdown ethnicity>


/ caption = "Ethnicity (Please choose one)"


/ subcaption = "For the purposes of this question, ~"East Asian~" refers to anywhere in East Asia (e.g., China, Korea, Vietnam, etc.), ~"South Asian~" refers to anywhere in South Asia or South East Asia (e.g., India, Sri Lanka, Pakistan, Indonesia, etc.), ~"White~" refers to anywhere in Europe, the Caucuses, Australia, or New Zealand, ~"Black~" refers to anywhere in the Carribean, West Coast of Africa, or Sub-Saharan Africa, ~"Middle Eastern~" refers to anywhere in the Middle East or Northern Africa (e.g., Arab ethnicity), ~"Latino~" refers to anywhere from Central or South America, and ~"Multiracial~" is any combination of two or more of the previous 6 ethnic groupings."


/ options = ("East Asian","South Asian","White","Black","Middle Eastern","Latino","Multiracial")


/ optionvalues = ("1","2","3","4","5","6","7")


</dropdown>


 


<surveypage demographicspage>


/ caption = "Please begin by answering the following demographic questions:"


/ questions = [1=sex;2=ethnicity]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.ingroup.item.1 = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.ingroup.item.1 = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.ingroup.item.1 = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.ingroup.item.1 = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.ingroup.item.1 = "Middle Eastern"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.ingroup.item.1 = "Latino"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.ingroup.item.1 = "Multiracial"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "Multiracial"]


/ ontrialend = [if (dropdown.ethnicity.checked.1 == true) item.outgroups.item = "Middle Eastern"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "Multiracial"]


/ ontrialend = [if (dropdown.ethnicity.checked.2 == true) item.outgroups.item = "Middle Eastern"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "Multiracial"]


/ ontrialend = [if (dropdown.ethnicity.checked.3 == true) item.outgroups.item = "Middle Eastern"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "Multiracial"]


/ ontrialend = [if (dropdown.ethnicity.checked.4 == true) item.outgroups.item = "Middle Eastern"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.5 == true) item.outgroups.item = "Multiracial"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.6 == true) item.outgroups.item = "Middle Eastern"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "East Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "South Asian"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "White"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "Black"]


/ ontrialend = [if (dropdown.ethnicity.checked.7 == true) item.outgroups.item = "Middle Eastern"]


/ ontrialend = [if (dropdown.sex.checked.1 == true) item.participantsex.item.1 = "Female"]


/ ontrialend = [if (dropdown.sex.checked.2 == true) item.participantsex.item.1 = "Male"]


</surveypage>


 


<survey demographics>


/ pages = [1=demographicspage]


</survey>


 


********** PERSON PERCEPTION TASK **********


 


<text descriptions>


/ items = ("Description 1","Description 2","Description 3","Description 4","Description 5","Description 6","Description 7","Description 8","Description 9","Description 10","Description 11","Description 12")


/ select = noreplacenorepeat


/ position = (50,50)


</text>


 


<item participantsex>


/ 1 = dropdown.sex.option


</item>


 


<item ingroup>


/ 1 = dropdown.ethnicity.option


</item>


 


<item outgroups>


</item>


 


<text ingroupfilled>


/ items = ingroup


/ position = (25,25)


</text>


 


<text outgroupsfilled>


/ items = outgroups


/ position = (25,25)


</text>


 


<text sexfilled>


/ items = participantsex


/ position = (25,30)


</text>


 


<trial ingroup>


/ stimulustimes = [1=ingroupfilled;2=sexfilled;100=descriptions]


/ response = anyresponse


</trial>


 


<trial outgroup>


/ stimulustimes = [1=outgroupsfilled;2=sexfilled;100=descriptions]


/ response = anyresponse


</trial>


 


<block ingroup100>


/ trials = [1-12=ingroup]


</block>


 


<block ingroup075>


/ trials = [1-12=noreplacenorepeat(ingroup,ingroup,ingroup,outgroup)]


</block>


 


<block ingroup050>


/ trials = [1-12=noreplacenorepeat(ingroup,ingroup,outgroup,outgroup)]


</block>


 


<block ingroup025>


/ trials = [1-12=noreplacenorepeat(ingroup,outgroup,outgroup,outgroup)]


</block>


 


<block ingroup000>


/ trials = [1-12=noreplacenorepeat(outgroup,outgroup,outgroup,outgroup)]


</block>











<expt>


/ subjects = (1 of 5)


/ blocks = [1=demographics;2=ingroup100]


</expt>


 


<expt>


/ subjects = (2 of 5)


/ blocks = [1=demographics;2=ingroup075]


</expt>


 


<expt>


/ subjects = (3 of 5)


/ blocks = [1=demographics;2=ingroup050]


</expt>


 


<expt>


/ subjects = (4 of 5)


/ blocks = [1=demographics;2=ingroup025]


</expt>


 


<expt>


/ subjects = (5 of 5)


/ blocks = [1=demographics;2=ingroup000]


</expt>


-------------


I hope this helps other people!!



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search