PROBLEM with INCLUDE used to run scripts specific for Subjects' IDs


Author
Message
Alberto
Alberto
Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)
Group: Forum Members
Posts: 5, Visits: 7
I am having a problem with INCLUDE function, which I am using to assign specific subject ID's to task rotations. All other scripts are running independently and together by using the BATCH function. 

Basically, I have combined multiple .iqx script files into one batch script file, to create a continuous experiment of pages, surveys and stimuli. To create the rotation of stimuli, I have manually rotated the specific .iqx files to run with specific subjects' ID's.  Code as follows:

<batch>


/ file = "Intro_SAM.iqx"
/ file = "SAM1.iqx"
/ file = "intro_SAM_end.iqx"
/ file = "intro_questionnaires.iqx"
/ file = "demographic.iqx"
/ file = "PID2.iqx"
/ file = "ASQ.iqx"
/ file = "CTQSF.iqx"
/ file = "break.iqx"
/ file = "intro_media.iqx"
/ file = "intro_PICS.iqx"
/ file = "SAD_PICS1.iqx"
/ file = "intro_MOVIES.iqx"
/ file = "SAD_MOVIES1.iqx"
/ file = "intro_SAD_AUTOBIO1.iqx"
/ file = "SAD_AUTOBIO1.iqx"
/ file = "SAM2.iqx"
/ file = "intro_task.iqx"
/ file = "yonitest.iqx"
/ file = "DEBRIEF.iqx"

</batch>

I was wondering if it were possible to use this include function solution from https://www.millisecond.com/forums/Topic19661.aspx#bm19667, to assign specific subject ID's to a script file.

Given these scripts use different methods or functions and have different declared variables, collecting different data. Also, without re-declaring all variables, to be included within the  newly created include function script. After uploading the following code to Inquisit Lab's Web Server and entering a subject ID, the "Thank For Participating" Page appearing. However, no experiment has displayed or run.  Code Example:

// subject ids that should be administered Rot7_SAD_PMA
<include>
/ precondition = [script.subjectid == "13" || script.subjectid == "28" || script.subjectid == "45" || script.subjectid == "61" || script.subjectid == "78" || script.subjectid == "93" || script.subjectid == "114" || script.subjectid == "127" || script.subjectid == "158" || script.subjectid == "163" || script.subjectid == "195" || script.subjectid == "204" || script.subjectid == "224" || script.subjectid == "239" || script.subjectid == "263" || script.subjectid == "289" || script.subjectid == "290"
]
/ file = "Rot7_SAD_PMA.iqx"
</include>

// subject ids that should be administered Rot8_SAD_PAM
<include>
/ precondition = [script.subjectid == "18" || script.subjectid == "30" || script.subjectid == "48" || script.subjectid == "59" || script.subjectid == "75" || script.subjectid == "105" || script.subjectid == "115" || script.subjectid == "140" || script.subjectid == "153" || script.subjectid == "175" || script.subjectid == "190" || script.subjectid == "205" || script.subjectid == "223" || script.subjectid == "237" || script.subjectid == "261" || script.subjectid == "275" || script.subjectid == "296" || script.subjectid == "290"
]
/ file = "Rot8_SAD_PAM.iqx"
</include>

// subject ids that should be administered Rot9_SAD_MPA

<include>
/ precondition = [script.subjectid == "17" || script.subjectid == "23" || script.subjectid == "53" || script.subjectid == "55" || script.subjectid == "84" || script.subjectid == "95" || script.subjectid == "121" || script.subjectid == "138" || script.subjectid == "151" || script.subjectid == "172" || script.subjectid == "207" || script.subjectid == "218" || script.subjectid == "244" || script.subjectid == "253" || script.subjectid == "283" || script.subjectid == "306"
]
/ file = "Rot9_SAD_MPA.iqx"
</include>

// subject ids that should be administered Rot10_SAD_MAP
<include>
/ precondition = [ script.subjectid == "4" || script.subjectid =="24" ||script.subjectid == "44" || script.subjectid == "63" || script.subjectid == "82" || script.subjectid == "98" || script.subjectid == "120" || script.subjectid == "135" || script.subjectid == "146" || script.subjectid == "165" || script.subjectid == "211" || script.subjectid == "220" || script.subjectid == "236" || script.subjectid == "258" || script.subjectid == "285" || script.subjectid == "301"
]
/ file = "Rot10_SAD_MAP.iqx"
</include>

// subject ids that should be administered Rot11_SAD_AMP
<include>
/ precondition = [script.subjectid == "6" || script.subjectid == "36" || script.subjectid == "37" || script.subjectid == "57" || script.subjectid == "79" || script.subjectid == "107" || script.subjectid == "113" || script.subjectid == "131" || script.subjectid == "150" || script.subjectid == "178" || script.subjectid == "196" || script.subjectid == "199" || script.subjectid == "225" || script.subjectid == "238" || script.subjectid == "265" || script.subjectid == "282" || script.subjectid == "304"
]
/ file = "Rot11_SAD_AMP.iqx"
</include>

// subject ids that should be administered Rot12_SAD_APM

<include>
/ precondition = [script.subjectid == "15" || script.subjectid == "26" || script.subjectid == "51" || script.subjectid == "68" || script.subjectid == "81" || script.subjectid == "103" || script.subjectid == "126" || script.subjectid == "144" || script.subjectid == "160" || script.subjectid == "169" || script.subjectid == "198" || script.subjectid == "213" || script.subjectid == "232" || script.subjectid == "241" || script.subjectid == "264" || script.subjectid == "286" || script.subjectid == "291"
]
/ file = "Rot12_SAD_APM.iqx"
</include>


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: 12K, Visits: 98K
Alberto - 7/23/2019
I am having a problem with INCLUDE function, which I am using to assign specific subject ID's to task rotations. All other scripts are running independently and together by using the BATCH function. 

Basically, I have combined multiple .iqx script files into one batch script file, to create a continuous experiment of pages, surveys and stimuli. To create the rotation of stimuli, I have manually rotated the specific .iqx files to run with specific subjects' ID's.  Code as follows:

<batch>


/ file = "Intro_SAM.iqx"
/ file = "SAM1.iqx"
/ file = "intro_SAM_end.iqx"
/ file = "intro_questionnaires.iqx"
/ file = "demographic.iqx"
/ file = "PID2.iqx"
/ file = "ASQ.iqx"
/ file = "CTQSF.iqx"
/ file = "break.iqx"
/ file = "intro_media.iqx"
/ file = "intro_PICS.iqx"
/ file = "SAD_PICS1.iqx"
/ file = "intro_MOVIES.iqx"
/ file = "SAD_MOVIES1.iqx"
/ file = "intro_SAD_AUTOBIO1.iqx"
/ file = "SAD_AUTOBIO1.iqx"
/ file = "SAM2.iqx"
/ file = "intro_task.iqx"
/ file = "yonitest.iqx"
/ file = "DEBRIEF.iqx"

</batch>

I was wondering if it were possible to use this include function solution from https://www.millisecond.com/forums/Topic19661.aspx#bm19667, to assign specific subject ID's to a script file.

Given these scripts use different methods or functions and have different declared variables, collecting different data. Also, without re-declaring all variables, to be included within the  newly created include function script. After uploading the following code to Inquisit Lab's Web Server and entering a subject ID, the "Thank For Participating" Page appearing. However, no experiment has displayed or run.  Code Example:

// subject ids that should be administered Rot7_SAD_PMA
<include>
/ precondition = [script.subjectid == "13" || script.subjectid == "28" || script.subjectid == "45" || script.subjectid == "61" || script.subjectid == "78" || script.subjectid == "93" || script.subjectid == "114" || script.subjectid == "127" || script.subjectid == "158" || script.subjectid == "163" || script.subjectid == "195" || script.subjectid == "204" || script.subjectid == "224" || script.subjectid == "239" || script.subjectid == "263" || script.subjectid == "289" || script.subjectid == "290"
]
/ file = "Rot7_SAD_PMA.iqx"
</include>

// subject ids that should be administered Rot8_SAD_PAM
<include>
/ precondition = [script.subjectid == "18" || script.subjectid == "30" || script.subjectid == "48" || script.subjectid == "59" || script.subjectid == "75" || script.subjectid == "105" || script.subjectid == "115" || script.subjectid == "140" || script.subjectid == "153" || script.subjectid == "175" || script.subjectid == "190" || script.subjectid == "205" || script.subjectid == "223" || script.subjectid == "237" || script.subjectid == "261" || script.subjectid == "275" || script.subjectid == "296" || script.subjectid == "290"
]
/ file = "Rot8_SAD_PAM.iqx"
</include>

// subject ids that should be administered Rot9_SAD_MPA

<include>
/ precondition = [script.subjectid == "17" || script.subjectid == "23" || script.subjectid == "53" || script.subjectid == "55" || script.subjectid == "84" || script.subjectid == "95" || script.subjectid == "121" || script.subjectid == "138" || script.subjectid == "151" || script.subjectid == "172" || script.subjectid == "207" || script.subjectid == "218" || script.subjectid == "244" || script.subjectid == "253" || script.subjectid == "283" || script.subjectid == "306"
]
/ file = "Rot9_SAD_MPA.iqx"
</include>

// subject ids that should be administered Rot10_SAD_MAP
<include>
/ precondition = [ script.subjectid == "4" || script.subjectid =="24" ||script.subjectid == "44" || script.subjectid == "63" || script.subjectid == "82" || script.subjectid == "98" || script.subjectid == "120" || script.subjectid == "135" || script.subjectid == "146" || script.subjectid == "165" || script.subjectid == "211" || script.subjectid == "220" || script.subjectid == "236" || script.subjectid == "258" || script.subjectid == "285" || script.subjectid == "301"
]
/ file = "Rot10_SAD_MAP.iqx"
</include>

// subject ids that should be administered Rot11_SAD_AMP
<include>
/ precondition = [script.subjectid == "6" || script.subjectid == "36" || script.subjectid == "37" || script.subjectid == "57" || script.subjectid == "79" || script.subjectid == "107" || script.subjectid == "113" || script.subjectid == "131" || script.subjectid == "150" || script.subjectid == "178" || script.subjectid == "196" || script.subjectid == "199" || script.subjectid == "225" || script.subjectid == "238" || script.subjectid == "265" || script.subjectid == "282" || script.subjectid == "304"
]
/ file = "Rot11_SAD_AMP.iqx"
</include>

// subject ids that should be administered Rot12_SAD_APM

<include>
/ precondition = [script.subjectid == "15" || script.subjectid == "26" || script.subjectid == "51" || script.subjectid == "68" || script.subjectid == "81" || script.subjectid == "103" || script.subjectid == "126" || script.subjectid == "144" || script.subjectid == "160" || script.subjectid == "169" || script.subjectid == "198" || script.subjectid == "213" || script.subjectid == "232" || script.subjectid == "241" || script.subjectid == "264" || script.subjectid == "286" || script.subjectid == "291"
]
/ file = "Rot12_SAD_APM.iqx"
</include>


The code isn't helpful. What I need to say anything about this is the link to the web experiment.

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: 12K, Visits: 98K
Dave - 7/23/2019

The code isn't helpful. What I need to say anything about this is the link to the web experiment.

It's not clear from the code you posted and your explanation, but if the scripts you are trying to <include> are <batch> scripts, you cannot run them this way. The proper method is to create a single batch script and define the desired <batch> conditions. Suppose, for the sake of example, you have four rotations of three scripts A to C, plan to run 20 subjects and want to assign specific subject numbers to specific rotations. Then you do:

// rotation 1: a,b,c
<batch>
/ subjects = (4,5,12,18,20 of 20)
/ groupassignment = subjectnumber
/ file = "a.iqx"
/ file = "b.iqx"
/ file = "c.iqx"
</batch>

// rotation 2: b,c,a
<batch>
/ subjects = (2,6,15,16,19 of 20)
/ groupassignment = subjectnumber
/ file = "b.iqx"
/ file = "c.iqx"
/ file = "a.iqx"
</batch>

// rotation 3: c,a,b
<batch>
/ subjects = (1,3,10,11,13 of 20)
/ groupassignment = subjectnumber
/ file = "c.iqx"
/ file = "a.iqx"
/ file = "b.iqx"
</batch>

// rotation 4: a,c,b
<batch>
/ subjects = (7,8,9,14,17 of 20)
/ groupassignment = subjectnumber
/ file = "a.iqx"
/ file = "c.iqx"
/ file = "b.iqx"
</batch>



Alberto
Alberto
Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)
Group: Forum Members
Posts: 5, Visits: 7
Dave, 
thanks a lot for taking the time to clarify. We were misled by another post that used the INCLUDE command (which is not easy to use : -( )
We will try the elegant solution you recommended and will let you know!

Fingers crossed, 
Alberto Manzi
Alberto
Alberto
Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)
Group: Forum Members
Posts: 5, Visits: 7
...one more question:given that the group assignment will happen through the subject numbers what groupID should I specify in the setting of the web experiment setup page?

Thanks
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: 12K, Visits: 98K
Alberto - 7/23/2019
...one more question:given that the group assignment will happen through the subject numbers what groupID should I specify in the setting of the web experiment setup page?

Thanks

This entirely depends on whether any of the various scripts your <batch> executes relies on the group id for condition assignment and how many conditions there are (also see https://www.millisecond.com/forums/Topic13856.aspx ) . Since I don't know that, I cannot give you an exact answer. The compromise option would be to opt for either random or sequential group ids and leave the number of groups field blank.

Edited 5 Years Ago by Dave
Alberto
Alberto
Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)Respected Member (407 reputation)
Group: Forum Members
Posts: 5, Visits: 7
All clear. No, none of the other batches require condition assignments. If I can assign the subject ID# to the rotation of my choice, that rotation would also be the condition. I have 18 rotations total (6 for each condition) and I manually did the random assignment of subject # to rotation. I wonder if I leave group ID random or blank what that is going to do...I guess I'll have to try...
Thanks!


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: 12K, Visits: 98K
Alberto - 7/23/2019
All clear. No, none of the other batches require condition assignments. If I can assign the subject ID# to the rotation of my choice, that rotation would also be the condition. I have 18 rotations total (6 for each condition) and I manually did the random assignment of subject # to rotation. I wonder if I leave group ID random or blank what that is going to do...I guess I'll have to try...
Thanks!


If none of your scripts rely on the group ID for condition assignment in any way, then the group ID will do absolutely nothing at all. I.e., then it does not matter which group ID setting you select or what the group ID for a specific participant ends up being, it will have no effect.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search