Millisecond Forums

Need help making an IAPS procedure, bundling trials + survey elements together?

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

By sunm - 12/28/2013

Hello! I'm trying to build an IAPS procedure. It basically goes:
Slide1<5 seconds>: "Get Ready to Rate the Next Slide"
Slide2<6 seconds>:  Display a random picture from sets of Pleasant, Neutral and Unpleasant
Slide3: A page with a slider to rate Arousal
Slide4: A page with a slider to rate Valence
Slide5: A page with a slider to rate Dominance
Repeat this 60 times.

I'm a bit stuck :(. Here are my issues:

1. I don't know how to organize the trials within the blocks to display a set of 3 pages of sliders after every picture display trial. (I tried to have the trials put in a list)
2. I want to be able to record what picture category and picture they are rating
3. I want to be able to record in what order they viewed the pictures


Here's my code so far:

<block IAPS>
/trials = [1,3,5,7,9=IAPSdisplayPicture; 2,4,6,8,10 = list.SAM1Ratings]
</block>



****Display the picture****
<trial IAPSdisplayPicture>
/ stimulustimes = [1= IAPSinstruct; 5000=noreplace(IAPSPleasantpic, IAPSNeutralpic)]
/ timeout = 11000
</trial>

<text IAPSinstruct>
/items = ("Get ready to rate the next slide")
/ position = (50%,50%)
</text>

<picture IAPSPleasantPic>
/items = Pleasant
/position = (50%,50%)
/select = sequence
</picture>


<picture IAPSNeutralPic>
/items = Neutral
/position = (50%,50%)
/select = sequence
</picture>



*********SAM*********
<list SAM1Ratings>
/items = (SAMA1, SAMV1, SAMD1)
/ selectionmode = sequence
</list>

***Maybe I should have a survey? but they don't count as trial objects****
<survey SAM1Ratings>
/ pages = [1=SAMA1; 2=SAMV1; 3=SAMD1]
/ showbackbutton = false
</survey>





**********Pages************

<surveypage SAMA1>
/ stimulustimes = [0=SAMAinstruct, SAM.A1, SAM.A2, SAM.A3, SAM.A4, SAM.A5, SAM.A6, SAM.A7, SAM.A8, SAM.A9]
/ questions = [1=SAMA1]
/ showquestionnumbers = false
</surveypage>

<surveypage SAMV1>
/ stimulustimes = [0=SAMVinstruct, SAM.V1, SAM.V2, SAM.V3, SAM.V4, SAM.V5, SAM.V6, SAM.V7, SAM.V8, SAM.V9]
/ questions = [1=SAMV1]
/ showquestionnumbers = false
</surveypage>

<surveypage SAMD1>
/ stimulustimes = [0=SAMDinstruct, SAM.D1, SAM.D2, SAM.D3, SAM.D4, SAM.D5, SAM.D6, SAM.D7, SAM.D8, SAM.D9]
/ questions = [1=SAMD1]
/ showquestionnumbers = false
</surveypage>

*****Slider questions. Will Need as many Sliders as there are pictures******

<slider SAMA1>
/ range = (0, 20)
/ increment = 1
/ position = (10%,55%)
/ showticks = false
/ showtooltips = false
/ slidersize = (100%, 10%)
</slider>

<slider SAMV1>
/ range = (0, 20)
/ increment = 1
/ position = (10%,55%)
/ showticks = false
/ showtooltips = false
/ slidersize = (100%, 10%)
</slider>

<slider SAMD1>
/ range = (0, 20)
/ increment = 1
/ position = (10%,55%)
/ showticks = false
/ showtooltips = false
/ slidersize = (100%, 10%)
</slider>

<text SAMAinstruct>
/ items = ("Please rate your arousal")
/ size = (500px, 200px)
/ fontstyle = ("Verdana", 14pt)
/ position = (50%,40%)
</text>

<text SAMVinstruct>
/ items = ("Please rate your valence")
/ size = (500px, 200px)
/ fontstyle = ("Verdana", 14pt)
/ position = (50%,40%)
</text>

<text SAMDinstruct>
/ items = ("Please rate your dominance")
/ size = (500px, 200px)
/ fontstyle = ("Verdana", 14pt)
/ position = (50%,40%)
</text>

By Dave - 12/28/2013

If you wanted to select surveypages via a <list>, you would have to use correct syntax:

<block myblock>
/ trials = [1-3=list.splist]
</block>

<list splist>
/ items = (surveypage.a, surveypage.b, surveypage.c)
/ selectionmode = sequence
</list>

<surveypage a>
/ caption = "A"
</surveypage>

<surveypage b>
/ caption = "B"
</surveypage>

<surveypage c>
/ caption = "C"
</surveypage>

But there should be no reason to do so. You should simply do

<block IAPS>
/trials = [1-5=sequence(IAPSdisplayPicture, SAMA1, SAMV1, SAMD1)]
</block>

The order of pictures will obviously be reflected by the respective stimulusitem and stimulusnumber columns in the data file.

By sunm - 12/30/2013

Thank you Dave, I feel like kicking myself, that seems obvious.

So, here are a few more questions related to this:

I have a set of IAPS pictures that are supposed to be fully counterbalanced on one of three psuedorandomized orders (Using van Carstenson's MIX software) across two groups of ethnicities. I currently have an <item IAPS.pictures> which stores all of my picture filenames.

1. How do I construct these orders in Inquisit? It seems unreasonable to build 3 <item> tags for each order, can I make a list instead?
2. I want the 3 SAM questions displayed after every picture, but I want separate responses for every picture. The SAM questions are each 1 sliders and a set of 9 pictures contained in a surveypage. If I have 60 IAPS pictures, Do I have to have a new slider and surveypage for all 60 picture stimuli?

3. <item> tag can only hold stimuli, and surveypage is a trial element. Can I hold all of my surveypages in an <item> or <list> and how do I pair each SAM question with its corresponding picture?

4. How do I ensure that my 3 orders are fully counterbalanced across the two groups?

Thank you again!
By Dave - 12/30/2013


> 1. How do I construct these orders in Inquisit? It seems unreasonable to build 3 <item> tags for each order, can I make a list instead?

There are any number of ways to do this. Using <list>s certainly is one of the possibilities.

> 2. I want the 3 SAM questions displayed after every picture, but I want separate responses for every picture. The SAM questions are each 1 sliders and a set of 9 pictures contained in a surveypage. If I have 60 IAPS pictures, Do I have to have a new slider and surveypage for all 60 picture stimuli?[/quote]

Depends on how exactly you want to display the pictures on the respective surveypages. If you use <image>, then yes, you need separate surveypages. If you use <picture>, then not necessarily (you already know how to pair various stimuli).

> 3. <item> tag can only hold stimuli, and surveypage is a trial element. Can I hold all of my surveypages in an <item> or <list> and how do I pair each SAM question with its corresponding picture?[/quote]

Selecting surveypages via a <list> has already been covered in this very thread above. Surveypages are not stimulus items, so there is no use for <item> elements here. Pairing stimuli has also been covered in previous conversations and still works exactly the same.

> 4. How do I ensure that my 3 orders are fully counterbalanced across the two groups?[/quote]

Again, depends. In general you counterbalance conditions between subjects via <expt> elements' /subjects and /groupassignment attributes.


By Dave - 12/30/2013

To add a few more concrete hints / ideas, here's a short self-contained example. Suppose I have six items A to F and want to display them in 4 different pre-determined orders to participants (between subjects). Then I could do something along the lines of

<expressions>
/ mysequence = if (values.sequencenumber == 1) sequence(2,4,6,1,3,5)
    else if (values.sequencenumber == 2) sequence(1,3,5,2,4,6)
    else if (values.sequencenumber == 3) sequence(1,2,3,4,5,6)
    else if (values.sequencenumber == 4) sequence(6,5,4,3,2,1)
    else 1
</expressions>

<values>
/ sequencenumber = 1
/ currentitem = 1
</values>

<text mytext>
/ items = myitems
/ select = values.currentitem
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
/ 5 = "E"
/ 6 = "F"
</item>

<trial mytrial>
/ ontrialbegin = [values.currentitem = expressions.mysequence]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<block myblock>
/ trials = [1-6=mytrial]
</block>

<expt>
/ onblockbegin = [values.sequencenumber = 1]
/ blocks = [1=myblock]
/ subjects = (1 of 4)
</expt>

<expt>
/ onblockbegin = [values.sequencenumber = 2]
/ blocks = [1=myblock]
/ subjects = (2 of 4)
</expt>

<expt>
/ onblockbegin = [values.sequencenumber = 3]
/ blocks = [1=myblock]
/ subjects = (3 of 4)
</expt>

<expt>
/ onblockbegin = [values.sequencenumber = 4]
/ blocks = [1=myblock]
/ subjects = (4 of 4)
</expt>

Please note that there probably are a dozen or more other ways to achieve the same.
By sunm - 1/1/2014

Thanks Dave, I think that clears up the confusion I had with the counterbalancing orders!

I'm still confused with how to set up multiple identically formatted surveypages so I tried a couple of things
I have 60 <slider> items that correspond to each IAPS picture, and I have an <item> that has the names of all 60 of these sliders. I'm attempting to have the surveypage dynamically pull up the slider name from an <item> corresponding to the picture stimulus that was just presented to the subject.

I tried using the .items.index property and the item(index) function and neither seem to be working. May be a formatting issue? I tried with quotes and without quotes, with <% %> and without. Any hints here?

My partial code:

<block IAPSb1>
/ontrialbegin = [values.currentitem = expressions.iapssequence]
/trials = [1-12=sequence(IAPSdisplayPicture, SAMV, SAMA, SAMD)]
</block>

**********Pages************

<surveypage SAMA>
/ stimulustimes = [0=SAMAinstruct, SAM.A1, SAM.A2, SAM.A3, SAM.A4, SAM.A5, SAM.A6, SAM.A7, SAM.A8, SAM.A9]
/ questions = [1= "<% item.iaps.SAMArousal.item(values.currentitem) %>"]
/ showquestionnumbers = false
/ showpagenumbers = false
/ finishlabel = "Next"
</surveypage>

<surveypage SAMV>
/ stimulustimes = [0=SAMVinstruct, SAM.V1, SAM.V2, SAM.V3, SAM.V4, SAM.V5, SAM.V6, SAM.V7, SAM.V8, SAM.V9]
/ questions = [1= "<% item.iaps.SAMValence.item(values.currentitem) %>"]
/ showquestionnumbers = false
/ showpagenumbers = false
/ finishlabel = "Next"
</surveypage>

<surveypage SAMD>
/ stimulustimes = [0=SAMDinstruct, SAM.D1, SAM.D2, SAM.D3, SAM.D4, SAM.D5, SAM.D6, SAM.D7, SAM.D8, SAM.D9]
/ questions = [1= "<% item.iaps.SAMDominance.item(values.currentitem) %>"]
/ showquestionnumbers = false
/ showpagenumbers = false
/ finishlabel = "Next"
</surveypage>
By Dave - 1/1/2014

Sun,

<slider> elements aren't stimulus items either, so

/ questions = [1= "<% item.iaps.SAMArousal.item(values.currentitem) %>"]

is (a) invalid syntax on multiple levels and (b) there --again -- is no use for <item> elements in this context.

Example of one conceivable proper approach:

<expressions>
/ mysequence = sequence(2,1,3)
</expressions>

<values>
/ currentitem = 1
</values>

<block myblock>
/ trials = [1-3=sequence(mytrial, page1, page2)]
</block>

<trial mytrial>
/ ontrialbegin = [values.currentitem = expressions.mysequence]
/ stimulusframes = [1=mytext]
/ trialduration = 2000
</trial>

<text mytext>
/ items = ("A", "B", "C")
/ select = values.currentitem
</text>

<surveypage page1>
/ questions = [1=slider1]
/ showpagenumbers = false
</surveypage>

<surveypage page2>
/ questions = [1=slider2]
/ showpagenumbers = false
</surveypage>

<slider slider1>
/ caption = "<% list.slider1caption.nextvalue %>"
</slider>

<slider slider2>
/ caption = "<% list.slider2caption.nextvalue %>"
</slider>

<list slider1caption>
/ items = ("A1", "B1" "C1")
/ selectionmode = values.currentitem
</list>

<list slider2caption>
/ items = ("A2", "B2" "C2")
/ selectionmode = values.currentitem
</list>