Millisecond Forums

If then response likert scale

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

By Elmar - 4/4/2014

Dear moderator,

I'm working on my masterthesis and I have a slight problem. If a participants is a female she needs to hold a yellow stretchband. If the participants is male he needs to hold a red stretchband. So I need to program IF female THEN yellow and IF male THEN red. How do I program this? (I already have the likert question below)

<likert gender>
/ numpoints = 2
/ anchors = [1="Male"; 2="Female"]
/ stimulustimes = [1=questiongender]
</likert>

<text questiongender>
/ items = ("What is your gender?")
/ position = (50,30)
</text>
By Dave - 4/4/2014

> So I need to program IF female THEN yellow and IF male THEN red. How do I program this?

Please explain what that's supposed to mean exactly. In other words: What exactly do you want the script to *do* if someone responds male vs. if someone responds female? This isn't at all clear from your post.
By Elmar - 4/4/2014

Ok let me refrase that. If someone responds male I want text to show "please hold the red stretchband" and if someone responds female "please hold the yellow stretchband". How do I do this?
By Dave - 4/4/2014

<block someblock>
/ trials = [1=sequence(gender,colormessage)]
</block>

<likert gender>
/ numpoints = 2
/ anchors = [1="Male"; 2="Female"]
/ stimulustimes = [1=questiongender]
</likert>

<text questiongender>
/ items = ("What is your gender?")
/ position = (50,30)
</text>

<trial colormessage>
/ stimulusframes = [1=messagetxt]
/ validresponse = (57)
</trial>

<text messagetxt>
/ items = ("Please hold the RED stretchband.", "please hold the YELLOW stretchband.")
/ select = likert.gender.response
</text>

By Elmar - 4/4/2014

Thank you! You are a lifesaver : ).
By Elmar - 4/4/2014

Ok one more question. I want to make it a little more complicated. If someone is a male participant I want inquisit to randomly show "please hold the red stretchband" or "please hold the purple stretchband". If someone is a female participant I want inquisit to randomly show "please hold the yellow stretchband" or "please hold the green stretchband" How do I do this?
By Dave - 4/4/2014

<values>
/ coloritem = 1
</values>

<block someblock>
/ trials = [1=sequence(gender,colormessage)]
</block>

<likert gender>
/ ontrialend = [if (likert.gender.response==1) values.coloritem = replace(1,2)]
/ ontrialend = [if (likert.gender.response==2) values.coloritem = replace(3,4)]
/ numpoints = 2
/ anchors = [1="Male"; 2="Female"]
/ stimulustimes = [1=questiongender]
</likert>

<text questiongender>
/ items = ("What is your gender?")
/ position = (50,30)
</text>

<trial colormessage>
/ stimulusframes = [1=messagetxt]
/ validresponse = (57)
</trial>

<text messagetxt>
/ items = ("Please hold the RED stretchband.", "Please hold the PURPLE stretchband."
"Please hold the YELLOW stretchband.", "Please hold the GREEN stretchband.")
/ select = values.coloritem
</text>