Millisecond Forums

Serving trials according to a list

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

By drivas - 8/12/2014

Hi, my experiment requires that all subjects receive the exact same order of presentation of trials (though such order will be a random one). Is there any way to achieve this, for example by storing a list of trial names somewhere and going through it? I was unable to this by using a list storing strings and retrieving them with list.mylist.nextvalue. I have a feeling this could be achieved by some conditional logic but I could not find the syntax to use it inside a /stimulustimes property.

Thanks
By Dave - 8/12/2014

> my experiment requires that all subjects receive the exact same order of presentation of trials (though such order will be a random one

I am not sure what exactly that's supposed to mean. Please be more specific.
By Dave - 8/12/2014

If you merely want to run trials in a predetermined order, you do not need any <list> or conditional logic. You simply do:

<block someblock>
/ trials = [1,4=a; 2=b; 3=c; ...]
</block>

or

<block someblock>
/ trials = [1=sequence(a,b,c,a,...)]
</block>

You can use a <list> to achieve the same thing, but there's no obvious reason why you should.

<list triallist>
/ items = (trial.a, trial.b, trial.c, trial.a)
/ selectionmode = sequence
</list>

<block someblock>
/ trials = [1-4=list.triallist]
</block>
By drivas - 8/13/2014

Yes, I meant serving surveypages in a predetermined order. I can't hard code them with stimulustime = [1=a, 2=b, ...] be cause there are 300 of them. However I tried your list suggestion and suddenly my script crashes just after the first surveypage finishes. I wrote:

<list similarityTaskOrder>
/ items = (surveypage.LL, surveypage.KK, surveypage.LL, surveypage.KK, surveypage.LL, surveypage.LL, surveypage.LK, surveypage.LL, surveypage.KL, surveypage.LK, surveypage.KL, surveypage.LK, surveypage.LL, surveypage.LL, surveypage.KK, surveypage.KK, surveypage.KL, surveypage.LK, surveypage.KK, surveypage.KK, surveypage.KL, surveypage.LK, surveypage.LK, surveypage.LL, surveypage.KL, surveypage.KK, surveypage.LK, surveypage.KK, surveypage.KL, surveypage.KK, surveypage.KL, surveypage.LK, surveypage.LK, surveypage.LL, surveypage.LL, surveypage.KK, surveypage.KL, surveypage.KL, surveypage.LK, surveypage.KL)
/ selectionmode = sequence
</list>

<survey similarityJudgmentTask>
/ showbackbutton = false
/ pages = [1-40=list.similarityTaskOrder]
</survey>
By Dave - 8/13/2014

There's nothing I can say about that crash based on that code snippet. I can say, though, that a simple, minimal example along the same lines

<list similarityTaskOrder>
/ items = (surveypage.LL, surveypage.KK, surveypage.LL, surveypage.KK)
/ selectionmode = sequence
</list>

<survey similarityJudgmentTask>
/ showbackbutton = false
/ pages = [1-4=list.similarityTaskOrder]
</survey>

<surveypage ll>
/ caption = "ll"
</surveypage>

<surveypage kk>
/ caption = "kk"
</surveypage>

does not result in any crashing for me.

However, more importantly, you very definitively *do not* want to run your <surveypage>s via a <survey> element here. Run them via a <block>'s /trials attribute. Running a given <surveypage> repeatedly -- as you seem to want to do -- is not compatible with a <survey>'s data recording format (a single line).
By drivas - 8/13/2014

Changing it to a block fixed the crash! thank you.