Millisecond Forums

How to save survey and trials data in to one data file?

https://forums.millisecond.com/Topic17723.aspx

By kulajw - 11/14/2015


Hi everyone,

I am creating a script with survey and trials. I would like to collect all data from this script in to one datafile, but <survey> element create separate file for survey results. When I use surveypage elements as a blocks in exp then all data are store in one file, but when I group surveypages within survey element then data are split in two files.

It is possible to force <survey> element to save data in to one common file together with other trials results?

Thanks for response !

This is a schema of my script:
>>>>>>>>>>>>>>>>survey
<surveypage my_surveypage>
/questions = [1=q1;2=q2]
</surveypage>

<survey my_survey>
/pages = [1=my_surveypage]
</survey>

<dropdown q1>
/ caption="Who was the first president of the United States:"
/ options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
/ required=true
</dropdown>

<radiobuttons q2>
/ caption="Who was the first president of the United States:"
/ options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
/ required=true
</radiobuttons>



>>>>>>>>>TRIAL
<text stimuli>
/items = ("XXX")
/position = (50,50)
</text>

<trial my_trial >
/stimulustimes = [0=stimuli]
/timeout = 7500
/correctresponse = (205)
/validresponse = (203,205)
</trial>

<block my_block>
/trials = [1=my_trial]
</block>

<expt my_expt>
/ blocks = [1=my_block;2=my_survey]
</expt>
By Dave - 11/14/2015

> It is possible to force <survey> element to save data in to one common file together with other trials results?

No, because the *data format* for <survey>s is different -- a single line per subject, one column for each question / its response(s).

As you correctly discovered, if you want everything in a single file, you need to run your <surveypage>s via a <block> element, *not* via a <survey> element, i.e. you ought to do

<block my_survey>
/trials= [1=my_surveypage]
</block>

instead of

<survey my_survey>
/pages = [1=my_surveypage]
</survey>