Setting a maximum of consecutive block repeats in an anticipatory anxiety task (block design)


Author
Message
WarrenL
WarrenL
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 12, Visits: 102
Hi again,

I'm constructing an anticipatory anxiety task whereby an indicator slide (i.e <picture threatpicture>- <picture safepicture>) is presented, followed by the corresponding emotionally valent image, selected images from either <picture negpictures> or <picture pospictures> respectively,

In essence there are two block types that present either the threat+negative picture combination (<block negblock>) or the safe+positive picture combination (<block posblock>). Each block is presented 15 times (with no pictures repeated). 

What I want to do is have a condition that allows either block to repeat itself, as long as it is not repeated consecutively more than three times.
For example,
presentation sequence: [negblock - negblock - negblock - posblock - posblock] is okay as it is only 3 repeated 3 times 
while : [negblock - negblock - negblock - negblock - posblock] is not ideal.

Is there a method to set a specific maximum allowed consecutive repeats? I have been scratching my head about it but thought best to ask before wasting any more time. 

The original code is below; I've attached the picture files as well if they are easier for running the script (warning: some are pretty unpleasant).

Thanks for your help in advance!

Cheers
Warren


<defaults>
/ screencolor = white
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 0)
/ txcolor = black
/ inputdevice = keyboard
</defaults>

<data>
/ separatefiles = true
</data>

--------------------------------------------
****STIMULI****
--------------------------------------------

<text fixationcross>
/items = ("+")
/fontstyle = ("arial", 10%, false, false, false, false, 5)
</text>


<text captioncrave>
/items = ("How severe is your craving for alcohol RIGHT NOW")
/ height = 40%
</text>

<text labelnocrave>
/items = ("No craving")
/fontstyle = ("arial", 36, false, false, false, false, 5)
/ hposition = 12%
/ vposition = 53%
/ hjustify = center
</text>

<text labelhighcrave>
/items = ("Very severe craving")
/ fontstyle = ("arial", 36, false, false, false, false, 5)
/ hposition = 88%
/ vposition = 53%
/ hjustify = center
</text>

<picture negpictures>
/ items = neglist
/ select = noreplace
/resetinterval = 0
/size = (100%,100%)

</picture>

<picture pospictures>
/ items = poslist
/ select = noreplace
/resetinterval = 0
/size = (100%,100%)
</picture>

<picture threatpicture>
/ items = ("threatcue.jpg")
/ select = noreplace
/resetinterval = 0
/size = (100%,100%)
</picture>

<picture safepicture>
/ items = ("safecue.jpg")
/ select = noreplace
/resetinterval = 0
/size = (100%,100%)
</picture>

<slider VAScrave>
/ labels = ("no craving", "strong craving")
/ range = (1, 100)
/ position = (15%,50%)
/ slidersize = (60, 5%)
/ showtooltips = false
</slider>

<clock timer>
/ mode = timer
/ resetrate = trial
/ txcolor = black
/ txbgcolor = white
/ timeout = 10000
/ position = (50%, 80%)
/ format = "s"
</clock>

--------------------------------------------
****PICTURE ITEMS****
--------------------------------------------

<item neglist>
/1 = "neg3001.jpg"
/2 = "neg3015.jpg"
/3 = "neg3053.jpg"
/4 = "neg3063.jpg"
/5 = "neg3064.jpg"
/6 = "neg3102.jpg"
/7 = "neg3261.jpg"
/8 = "neg6021.jpg"
/9 = "neg6212.jpg"
/10 = "neg6520.jpg"
/11 = "neg6563.jpg"
/12 = "neg9252.jpg"
/13 = "neg9410.jpg"
/14 = "neg9412.jpg"
/15 = "neg9413.jpg"


</item>

<item poslist>
/1 = "pos1710.jpg"
/2 = "pos2045.jpg"
/3 = "pos2155.jpg"
/4 = "pos2158.jpg"
/5 = "pos2208.jpg"
/6 = "pos2216.jpg"
/7 = "pos2303.jpg"
/8 = "pos2345.jpg"
/9 = "pos2347.jpg"
/10 = "pos2389.jpg"
/11 = "pos4626.jpg"
/12 = "pos5629.jpg"
/13 = "pos5825.jpg"
/14 = "pos5833.jpg"
/15 = "pos8080.jpg"



</item>

--------------------------------------------
****TRIALS****
--------------------------------------------

<trial fixationtrial>
/ stimulustimes = [1=fixationcross]
/ timeout = 500
</trial>


<trial negtrial>
/ stimulustimes = [1=negpictures]
/ timeout = 500
/posttrialpause = 1

</trial>

<trial postrial>
/ stimulustimes = [1=pospictures]
/ timeout = 500
/posttrialpause = 1

</trial>

<trial threatcuetrial>
/ stimulustimes = [1=threatpicture]
/ timeout = 1000
/posttrialpause = 1

</trial>

<trial safecuetrial>
/ stimulustimes = [1=safepicture]
/ timeout = 1000
/posttrialpause = 1

</trial>

<surveypage VAScravepage>
/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)
/ stimulusframes = [1=captioncrave, timer, labelnocrave, labelhighcrave]
/ questions = [1=Vascrave]
/timeout = 10000

</surveypage>




--------------------------------------------
****BLOCKS****
--------------------------------------------


<block negblock>
/ trials = [1 = fixationtrial; 2=threatcuetrial; 3=negtrial]
</block>

<block posblock>
/ trials = [1= fixationtrial; 2=safecuetrial; 3=postrial]
</block>

<block vascraveblock>
/ trials = [1= vascravepage]
</block>

<expt>
/ blocks = [1-30=noreplace(negblock,posblock)]

</expt>

Attachments
negphotos.zip (284 views, 4.00 MB)
WarrenL
WarrenL
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 12, Visits: 102
unfortunately it won't let me upload the other pictures...
Dave
Dave
Supreme Being (784K reputation)Supreme Being (784K reputation)Supreme Being (784K reputation)Supreme Being (784K reputation)Supreme Being (784K reputation)Supreme Being (784K reputation)Supreme Being (784K reputation)Supreme Being (784K reputation)Supreme Being (784K reputation)
Group: Administrators
Posts: 10K, Visits: 51K
The way to do this is to use a properly configured <list> element for block selection. Particularly, you'll want to use its /maxrunsize attribute to specify the maximum number of allowable repeats:

<expt>
/ blocks = [1-30=list.blocklist]
</expt>

<list blocklist>
/ items = (block.a, block.b)
/ poolsize = 30
/ maxrunsize = 3
</list>

<block a>
/ trials = [1=mytrial]
</block>

<block b>
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ validresponse = (0)
/ trialduration = 100
</trial>


WarrenL
WarrenL
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 12, Visits: 102
Huge help as always Dave - didn't think of setting the list, worked perfectly

Thanks a million!

Cheers
Warren
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search