Customize demographic survey: how can I add columns to the output file?


Author
Message
Nessajalein
Nessajalein
Associate Member (228 reputation)Associate Member (228 reputation)Associate Member (228 reputation)Associate Member (228 reputation)Associate Member (228 reputation)Associate Member (228 reputation)Associate Member (228 reputation)Associate Member (228 reputation)Associate Member (228 reputation)
Group: Forum Members
Posts: 1, Visits: 6
Hi everybody,
I am trying to customize the demographic survey from the Millisecond Test Library. I need not only some demographic questions, but a few more about scents. So I added them in the script. Unfortunately, the responses do not appear in the output file. And how can I Not record response latencies? (I really don't need them.) I am not an Inquisit expert but need to solve this problem really quickly for my master thesis. Does anybody have an idea or an answer?
That would be great!

Thanks! Vanessa

This is my script (sorry fro the mess and that the questions are in German):
*******************************************************************************************************************
*******************************************************************************************************************
DEMOGRAPHIC SURVEY TEMPLATE
*******************************************************************************************************************
*******************************************************************************************************************
Script Info

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 12-09-2014

last updated: 12-09-2014 by K.Borchert for Millisecond Software LLC

Copyright © 12-09-2014 Millisecond Software
*******************************************************************************************************************
*******************************************************************************************************************
BACKGROUND INFO
*******************************************************************************************************************
*******************************************************************************************************************
*SCRIPT PURPOSE*

This script implements a template for a Demographic Survey in the US.

All individual questions can be edited under section "QUESTIONS"
All surveypage elements can be edited under section "SURVEYPAGES"

*******************************************************************************************************************
*******************************************************************************************************************
EDITABLE CODE: The code in this section can be easily altered (look for additional instructions were indicated)
*******************************************************************************************************************
*******************************************************************************************************************

***************************************************************************************
*********************************************
Editable Values
*********************************************
***************************************************************************************
/pageinstructions:the instructions that appear at the top of each surveypage

/quitinstructions:the instructions to quit the questionnaire
Note: the quitcommand can be changed under DEFAULTS
<values>
/demographicpageinstructions = ""
/quitinstructions = ""
</values>

***************************************************************************************
*********************************************
Editable Instructions
*********************************************
***************************************************************************************
<instruct>
/windowsize = (80%, 80%)
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)
/ txcolor = (black)
/ finishlabel = "Press <Spacebar> to continue"
/nextkey = (57)
/nextlabel = "Press <Spacebar> to continue"
/prevkey = (28)
/prevlabel = "Press <Enter> to go back"
</instruct>


<page end>
Herzlichen Dank für Ihre Unterstützung!
</page>

*******************************************************************************************************************
*******************************************************************************************************************
DATA: this section contains data file information
*******************************************************************************************************************
*******************************************************************************************************************

********************
raw data: Demographics.iqdat
********************
date, time, group, subject:date and time script was run with the current group/subjectnumber
build:the Inquisit build

q*_response:response given (in assigned values)


q*_latency:how much time (in ms) the participant spent on the surveypage with this particular question (the last time this particular surveypage was visited)


********************
Summary data
********************
date, time, subject:date and time script was run with the current subjectnumber
script.elapsedtime:time it took to run script (in ms)
/completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run)

<data>
/file = "Duft_Demographie_summary.iqdat"
/columns = [date, time, subject, script.elapsedtime, values.completed]
/separatefiles = false
</data>

********************
Raw data
********************

<data>
/file = "Duft_Demographie_rawdata.iqdat"
/ columns = [date, time, group, subject, script.elapsedtime, values.completed, Duftwahrnehmung, Duftwahrnehmungjetzt, Duft, FähigkeitDuftwahrnehmung,
EinschränkungDuftwahrnehmung, DuftIst1, DuftIst2, DuftIst3, MagDuft, EmpfindeDuft1, EmpfindeDuft2, EmpfindeDuft3, EmpfindeDuft4,
Geschlecht, Alter, Bildung, Anmerkungen ]
/separatefiles = false
</data>

*******************************************************************************************************************
*******************************************************************************************************************
REMAINING CODE: Customize after careful consideration only
*******************************************************************************************************************
*******************************************************************************************************************

*******************************************************************************************************************
*******************************************************************************************************************
DEFAULTS:
*******************************************************************************************************************
*******************************************************************************************************************
requires Inquisit 4.0.7.0

<defaults>
/minimumversion = "4.0.7.0"
/ quitcommand = (Alt+18)
/canvasaspectratio = (4, 3)
</defaults>

*******************************************************************************************************************
*******************************************************************************************************************
VALUES: automatically updated
*******************************************************************************************************************
*******************************************************************************************************************
/completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run)

<values>
/completed = 0
</values>

*******************************************************************************************************************
*******************************************************************************************************************
QUESTIONS
*******************************************************************************************************************
*******************************************************************************************************************
Note: by default all questions are not required to be answered. To change, set
/required = true

*Duftwahrnehmung*

<radiobuttons Duftwahrnehmung>
/caption = "Haben Sie beim Betreten dieses Raumes oder während der Beantwortung dieses Fragebogens einen Raumduft wahrgenommen?"
/ options = ("ja", "nein")
/ optionvalues = ("0", "1")
/required = true
/orientation = vertical
</radiobuttons>

<radiobuttons Duftwahrnehmungjetzt>
/caption = "Nehmen Sie gerade einen Raumduft wahr?"
/ options = ("ja", "nein")
/ optionvalues = ("0", "1")
/required = true
/orientation = vertical
</radiobuttons>

<textbox Duft>
/caption = "Bitte geben Sie, wenn möglich, den Namen des Duftes an (z.B. Lavendel, Orange, Erdbeere)."
/required = true
</textbox>

<radiobuttons FähigkeitDuftwahrnehmung>
/caption = "Meine Fähigkeit Düfte wahrzunehmen ist ..."
/ options = ("1 sehr schlecht", "2", "3", "4", "5", "6", "7 sehr gut")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons EinschränkungDuftwahrnehmung>
/caption = "Haben Sie Einschränkungen bei der Wahrnehmung von Düften?"
/ options = ("ja", "nein")
/ optionvalues = ("0", "1")
/required = true
/orientation = vertical
</radiobuttons>

<radiobuttons DuftIst1>
/ options = ("1 nicht intensiv", "2", "3", "4", "5", "6", "7 intensiv")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons DuftIst2>
/ options = ("1 unangenehm", "2", "3", "4", "5", "6", "7 angenehm")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons DuftIst3>
/ options = ("1 mir unbekannt", "2", "3", "4", "5", "6", "7 mir bekannt")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons MagDuft>
/caption = "Ich mag den Duft ..."
/ options = ("1 überhaupt nicht", "2", "3", "4", "5", "6", "7 sehr gerne")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons EmpfindeDuft1>
/ options = ("1 warm", "2", "3", "4", "5", "6", "7 kühl")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons EmpfindeDuft2>
/ options = ("1 hart", "2", "3", "4", "5", "6", "7 weich")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons EmpfindeDuft3>
/ options = ("1 schmerzerzeugend", "2", "3", "4", "5", "6", "7 schmerzlindernd")
/required = true
/orientation = horizontal
</radiobuttons>

<radiobuttons EmpfindeDuft4>
/ options = ("1 heiß", "2", "3", "4", "5", "6", "7 kalt")
/required = true
/orientation = horizontal
</radiobuttons>

*Demographie*

<radiobuttons Geschlecht>
/caption = "Bitte geben Sie Ihr Geschlecht an."
/ options = ("männlich", "weiblich")
/ optionvalues = ("0", "1")
/required = true
/orientation = vertical
</radiobuttons>

<textbox Alter>
/caption = "Bitte geben Sie Ihr Alter an."
/ mask = positiveinteger
/ range = (10, 100)
/required = true
</textbox>

<radiobuttons Bildung>
/caption = "Welcher ist Ihr höchster erreichter Bildungsabschluss?"
/ options = ( 
"Ohne Schulabschluss",
"Hauptschulabschluss",
"Mittlere Reife",
"Abitur ohne Hochschulabschluss",
"Studium")
/ optionvalues = ("1", "2", "3", "4", "5")
/required = true
/orientation = vertical
</radiobuttons>

<textbox Anmerkungen>
/caption = "Falls Sie Anmerkungen zu dieser Befragung haben, können Sie uns diese gerne hier mitteilen."
/required = true
</textbox>


*******************************************************************************************************************
*******************************************************************************************************************
SURVEYPAGES
*******************************************************************************************************************
*******************************************************************************************************************
<surveypage Duft1>
/caption ="Die folgenden Fragen beziehen sich auf Ihre individuelle Wahrnehmung von Düften."
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = Duftwahrnehmung]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

<surveypage Duft2>
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = Duftwahrnehmungjetzt]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

<surveypage Duft3>
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = Duft]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

<surveypage Duft4>
/caption ="Die folgenden Fragen beziehen sich auf Ihre individuelle Wahrnehmung von Düften."
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = FähigkeitDuftwahrnehmung, EinschränkungDuftwahrnehmung]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

<surveypage Duft5>
/caption ="Bitte bewerten Sie die folgenden Aussagen. ~n~n~nDer Duft ist ..."
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = DuftIst1, DuftIst2, DuftIst3]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

<surveypage Duft6>
/caption ="Bitte bewerten Sie die folgenden Aussagen."
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = MagDuft]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

<surveypage Duft7>
/caption ="Bitte bewerten Sie die folgenden Aussagen."
/subcaption = "Ich empfinde den Duft grundsätzlich eher als ..."
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = EmpfindeDuft1, EmpfindeDuft2, EmpfindeDuft3, EmpfindeDuft4]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

<surveypage Demographie1>
/caption ="Abschließend noch ein paar Fragen zu Ihrer Person."
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/itemfontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/questions = [1 = Geschlecht, Alter, Bildung, Anmerkungen]
/showpagenumbers = false
/showquestionnumbers = false
/backbuttonposition = (10%, 90%)
/nextbuttonposition = (90%, 90%)
</surveypage>

*******************************************************************************************************************
*******************************************************************************************************************
SURVEY
*******************************************************************************************************************
*******************************************************************************************************************
Notes:
- presents the surveypages

<survey Duft_Demographie>
/pages = [1 = Duft1; 2 = Duft2; 3 = Duft3; 4 = Duft4; 5 = Duft5; 6 = Duft6; 7 = Duft7; 8 = Demographie1]
</survey>

*******************************************************************************************************************
*******************************************************************************************************************
SUMMARY: stores the summary variables to the datafile
*******************************************************************************************************************
*******************************************************************************************************************
<trial summary>
/recorddata = true
/trialduration = 0
/ontrialend = [values.completed = 1]
</trial>

<block summary>
/trials = [1 = summary]
</block>

*******************************************************************************************************************
*******************************************************************************************************************
EXPERIMENT
*******************************************************************************************************************
*******************************************************************************************************************
<expt >
/postinstructions = (end)
/blocks = [1 = Duft_Demographie; 2 = summary]
</expt>

*******************************************************************************************************************
End of File












Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
#1: You've defined two <data> elements in your script. You may only have one:

********************
Summary data
********************
date, time, subject:date and time script was run with the current subjectnumber
script.elapsedtime:time it took to run script (in ms)
/completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run)

<data>
/file = "Duft_Demographie_summary.iqdat"
/columns = [date, time, subject, script.elapsedtime, values.completed]
/separatefiles = false
</data>

********************
Raw data
********************

<data>
/file = "Duft_Demographie_rawdata.iqdat"
/ columns = [date, time, group, subject, script.elapsedtime, values.completed, Duftwahrnehmung, Duftwahrnehmungjetzt, Duft, FähigkeitDuftwahrnehmung,
EinschränkungDuftwahrnehmung, DuftIst1, DuftIst2, DuftIst3, MagDuft, EmpfindeDuft1, EmpfindeDuft2, EmpfindeDuft3, EmpfindeDuft4,
Geschlecht, Alter, Bildung, Anmerkungen ]
/separatefiles = false
</data>

Is suspect you actually want the 1st <data> element to be a *<summarydata>* element, so you should change it to that.

#2: This is not how you properly define data columns:

/ columns = [date, time, group, subject, script.elapsedtime, values.completed, Duftwahrnehmung, Duftwahrnehmungjetzt, Duft, FähigkeitDuftwahrnehmung,
EinschränkungDuftwahrnehmung, DuftIst1, DuftIst2, DuftIst3, MagDuft, EmpfindeDuft1, EmpfindeDuft2, EmpfindeDuft3, EmpfindeDuft4,
Geschlecht, Alter, Bildung, Anmerkungen
]

If you want to log e.g. the response to

<radiobuttons DuftIst1>
/ options = ("1 nicht intensiv", "2", "3", "4", "5", "6", "7 intensiv")
/required = true
/orientation = horizontal
</radiobuttons>

to the data file, you need to define

/ columns = [... radiobuttons.duftist1.response ...]

and so forth for the other types of questions.

You will find all of this covered in the language reference topic for the the <data> element in the documentation.

#3: However, since you run your <surveypages> via a <survey> element, the <data> element does *not* apply. The <data> element only applies to trials or surveypages run via <block> elements. A <survey> element creates a separate data file in a different format (a single row, with multiple columns per question); the <survey> data output *cannot* be customized. This will capture all your questions automatically and you do not need to define any <data> or <summarydata> elements for it, as you can see in the attached file created by your <survey>.



Attachments
Duft_Demographie.iqdat (844 views, 947 bytes)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search