Eimear
|
|
Group: Awaiting Activation
Posts: 19,
Visits: 148
|
Hello,
I want to use the 'include' element to run some demographic questions, questionnaires and IATs in one script. I have programmed it so that it all runs together fine until the end when the demographic section and questionnaires each repeat one extra time (the IATs do not) before the experiment ends. When they are run in their individual scripts they do not repeat like this so I'm likely doing something wrong in the 'include' part? Below is an example of the 'include' script where the demographic part repeats after the IATs:
<include> / file = "DemographicSurvey.iqx" / file = "IAT1.iqx" / file = "IAT2.iqx" / file = "IAT3.iqx" </include>
<defaults> / fontstyle = ("Arial", 3.5%) / screencolor = (255, 255, 255) / txbgcolor = (255, 255, 255) / txcolor = (0,0,0) / minimumversion = "4.0.0.0" / canvasaspectratio = (4, 3) </defaults>
<text error> / position = (50%, 75%) / items = ("X") / color = (255, 0, 0) / fontstyle = ("Arial", 10%, true) </text>
<data> / file = "DemographicSurvey.iqx" / file = "IAT1.iqdat" / file = "IAT2.iqdat" / file = "IAT3.iqdat" / columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response, correct, latency, stimulusnumber, stimulusitem, expressions.da, expressions.db, expressions.d, expressions.percentcorrect ] / separatefiles = true </data>
<values> / sum1a = 0 / sum2a = 0 / sum1b = 0 / sum2b = 0 / n1a = 0 / n2a = 0 / n1b = 0 / n2b = 0 / ss1a = 0 / ss2a = 0 / ss1b = 0 / ss2b = 0 / magnitude = "unknown" / n_correct = 0 </values>
<expressions> / m1a = values.sum1a / values.n1a / m2a = values.sum2a / values.n2a / m1b = values.sum1b / values.n1b / m2b = values.sum2b / values.n2b / sd1a = sqrt((values.ss1a - (values.n1a * (expressions.m1a * expressions.m1a))) / (values.n1a - 1)) / sd2a = sqrt((values.ss2a - (values.n2a * (expressions.m2a * expressions.m2a))) / (values.n2a - 1)) / sd1b = sqrt((values.ss1b - (values.n1b * (expressions.m1b * expressions.m1b))) / (values.n1b - 1)) / sd2b = sqrt((values.ss2b - (values.n2b * (expressions.m2b * expressions.m2b))) / (values.n2b - 1)) / sda = sqrt((((values.n1a - 1) * (expressions.sd1a * expressions.sd1a) + (values.n2a - 1) * (expressions.sd2a * expressions.sd2a)) + ((values.n1a + values.n2a) * ((expressions.m1a - expressions.m2a) * (expressions.m1a - expressions.m2a)) / 4) ) / (values.n1a + values.n2a - 1) ) / sdb = sqrt((((values.n1b - 1) * (expressions.sd1b * expressions.sd1b) + (values.n2b - 1) * (expressions.sd2b * expressions.sd2b)) + ((values.n1b + values.n2b) * ((expressions.m1b - expressions.m2b) * (expressions.m1b - expressions.m2b)) / 4) ) / (values.n1b + values.n2b - 1) ) / da = (m2a - m1a) / expressions.sda / db = (m2b - m1b) / expressions.sdb / d = (expressions.da + expressions.db) / 2 / preferred = "unknown" / notpreferred = "unknown" / percentcorrect = (values.n_correct/ (values.n1a + values.n1b + values.n2a + values.n2b)) * 100 </expressions>
<values> /showsummaryfeedback = true </values>
<expt> / subjects = (1 of 12) / blocks = [1=Demographics; 2=iat1targetcompatiblepractice; 3=iat1attributepractice; 4=iat1compatibletest1; 5=iat1compatibletestinstructions; 6=iat1compatibletest2; 7=iat1targetincompatiblepractice; 8=iat1incompatibletest1; 9=iat1incompatibletestinstructions; 10=iat1incompatibletest2; 11=iat1summary; 12=iat2targetcompatiblepractice; 13=iat2attributepractice; 14=iat2compatibletest1; 15=iat2compatibletestinstructions; 16=iat2compatibletest2; 17=iat2targetincompatiblepractice; 18=iat2incompatibletest1; 19=iat2incompatibletestinstructions; 20=iat2incompatibletest2; 21=iat2summary; 22=iat3targetcompatiblepractice; 23=iat3attributepractice; 24=iat3compatibletest1; 25=iat3compatibletestinstructions; 26=iat3compatibletest2; 27=iat3targetincompatiblepractice; 28=iat3incompatibletest1; 29=iat3incompatibletestinstructions; 30=iat3incompatibletest2; 31=iat3summary ] </expt>
Any suggestions welcome!
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
(1)
<data> / file = "DemographicSurvey.iqx" / file = "IAT1.iqdat" / file = "IAT2.iqdat" / file = "IAT3.iqdat" / columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response, correct, latency, stimulusnumber, stimulusitem, expressions.da, expressions.db, expressions.d, expressions.percentcorrect ] / separatefiles = true </data>
Those don't belong here, particularly the 1st /file attribute. You may have *one* /file attribute in your <data> element, not multiple.
(2) As to why something is repeating cannot be answered based on the code excerpts you provided. It'll depend on what's actually *in* the file "DemographicSurvey.iqx". If it has an <expt> element in it, that will be executed in addition to those in your "main" script. Remove it and run the <survey> elements in it via the /blocks attributes of the <expt>s in your main file.
|
|
|
Eimear
|
|
Group: Awaiting Activation
Posts: 19,
Visits: 148
|
Hi Dave,
Thanks so much - I had the expt in the separate files as well as the main ones. It doesn't repeat now that I've removed them.
Thanks for the info about the other files too!
Eimear
|
|
|
Eimear
|
|
Group: Awaiting Activation
Posts: 19,
Visits: 148
|
Hi Dave,
I have a quick follow-up question about the data files when using the 'include' element. With my script I run a demographic survey, then a questionnaire, IAT, questionnaire, IAT, questionnaire, IAT. With the data output I get a demographic file, a data file with all the questionnaire and IAT info, and a summary file for whichever IAT is listed first in the 'iinclude' file.
I was wondering if there is a way of generating a summary file that summarises all three IAT scores for each participant? Or three separate summary files with this info per participant? It doesn't work if I specify a summary file in each of the three individual IAT files and then run the overall 'include' script.
Thanks, Eimear
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
You cannot have your script output multiple summary files.
What you need to do is capture the relevant data for the three IATs in separate variables and have the existing, single <summarydata> element log those. I.e., add
<values> ... / iat1_d = 0 ... </values>
Then, in the summary <block> belonging to IAT1, first store the result of expressions.d in values.iat1_d and then reset the values before the start of the next IAT:
<block IAT1summary> ... / onblockend = [values.iat1_d = expressions.d; ...] / onblockend = [values.sum1a=0; values.sum2a=0; values.sum1b=0; values.sum2b=0; values.n1a=0; values.n2a=0; values.n1b=0; values.n2b=0;values.ss1a=0; values.ss2a=0; values.ss1b=0; values.ss2b=0;values.magnitude="unknown"; ...] ... </block>
Do the same for the other variables you are interested in (expressions.da, expressions.db, etc.) as well as the other IATs (IAT2, IAT3).
Finally log those values to the summary file
<summarydata> / columns = [..., values.iat1_d, ...] ... </summarydata>
|
|
|
Eimear
|
|
Group: Awaiting Activation
Posts: 19,
Visits: 148
|
Sorry Dave, still struggling with this. What you need to do is capture the relevant data for the three IATs in separate variables and have the existing, single <summarydata> element log those. I.e., add <values> ... / iat1_d = 0 ... </values>
So do I add the above (and other items e.g. iat1_da = 0; iat1_db = 0; iat2_d = 0 etc.) to the 'include' file?
Then, in the summary <block> belonging to IAT1, first store the result of expressions.d in values.iat1_d and then reset the values before the start of the next IAT: <block IAT1summary> ... / onblockend = [values.iat1_d = expressions.d; ...] / onblockend = [values.sum1a=0; values.sum2a=0; values.sum1b=0; values.sum2b=0; values.n1a=0; values.n2a=0; values.n1b=0; values.n2b=0;values.ss1a=0; values.ss2a=0; values.ss1b=0; values.ss2b=0;values.magnitude="unknown"; ...] ... </block> Do the same for the other variables you are interested in (expressions.da, expressions.db, etc.) as well as the other IATs (IAT2, IAT3).
I'm not sure how to do the above. Should I end up with something like the following for IAT1: <block IAT1summary> ... / onblockend = [values.iat1_d = expressions.d; values.iat1_da = expressions.da; values.iat1_db = expressions.db ] / onblockend = [values.sum1a=0; values.sum2a=0; values.sum1b=0; values.sum2b=0; values.n1a=0; values.n2a=0; values.n1b=0; values.n2b=0;values.ss1a=0; values.ss2a=0; values.ss1b=0; values.ss2b=0;values.magnitude="unknown"; ... what goes here??] ... </block>
Finally log those values to the summary file <summarydata> / columns = [..., values.iat1_d, ...] ... </summarydata>
So the full summary file in the 'include' part could be something like: <summarydata> / columns = [..., values.iat1_d, values.iat1_da, values.iat1_db, values.iat2_d, values.iat2_da, values.iat2_db, values.iat3_d, values.iat3_da, values.iat3_db] ... </summarydata>
Thanks again.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
> So do I add the above (and other items e.g. iat1_da = 0; iat1_db = 0; iat2_d = 0 etc.) to the 'include' file?
You add it to the <values> element that exists in your main file.
> I'm not sure how to do the above. Should I end up with something like the following for IAT1: > <block IAT1summary> > ... > / onblockend = [values.iat1_d = expressions.d; values.iat1_da = expressions.da; values.iat1_db = > expressions.db> ] > / onblockend = [values.sum1a=0; values.sum2a=0; values.sum1b=0; > values.sum2b=0; values.n1a=0; values.n2a=0; values.n1b=0; > values.n2b=0;values.ss1a=0; values.ss2a=0; values.ss1b=0; > values.ss2b=0;values.magnitude="unknown"; ... what goes here??] > ... > </block>
Yes, that's what you should end up with. Re. "what goes here??": Any other values you need to reset to zero between IATs.
|
|
|
Eimear
|
|
Group: Awaiting Activation
Posts: 19,
Visits: 148
|
I'm not sure where I'm going wrong but the summary file I get at the end still only has one set of d scores (and lots of empty value columns).
I've attached my zip file of scripts and example summary output for your info - if you wouldn't mind taking a look at what I've done I'd really appreciate it.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
The problem is that you are re-setting those values back to zero, which of course you should *not* do.
<block iat1summary> /skip = [values.showsummaryfeedback == false] / trials = [1=iat1summary] / recorddata = true / onblockend = [values.iat1_d = expressions.d; values.iat1_da = expressions.da; values.iat1_db = expressions.db] / onblockend = [values.sum1a=0; values.sum2a=0; values.sum1b=0; values.sum2b=0; values.n1a=0; values.n2a=0; values.n1b=0; values.n2b=0;values.ss1a=0; values.ss2a=0; values.ss1b=0; values.ss2b=0;values.magnitude="unknown"; values.iat1_d=0; values.iat1_da=0; values.iat1_db=0] </block>
|
|
|
Eimear
|
|
Group: Awaiting Activation
Posts: 19,
Visits: 148
|
Ok, I deleted that part in each IAT script but still get one set of d scores in the final summary output.
|
|
|