"Remembering" item from trial to trial with condition


Author
Message
Kuba S
Kuba S
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 16, Visits: 1

I trie to design experiment with 2 parts.


1:
Participants will get some questions and have to answer Yes/No on keybord for each one.


2:
Questions from first part, only where participants answered Yes will be showned with text box to fill


For example:


Do you like riding bus?

And if participant answer for this "Yes (D)", then in second part he will get the
same question (item:text) but trial will be a bit different (with one more item:text and one text box).


So how to "remember" item (text) and use it in further part of exp only if participant choose an answer on keyboard f.e.
"D" (Yes) ?


I'm strugling with that and have no idea where to start...


Bellow there's part of my code, but i stucked.


Thank you for the help




<expt>
/ preinstructions = (instrukcja1, instrukcja2)
/ blocks = [1=wstep;2=tribondy]
</expt>

<block wstep>
/ trials = [1=cwiczenie]
/ postinstructions = (koniec_cwicz)
</block>

<block tribondy>
/ trials = [1=tribond1;2=tribond2;3=tribond3]
/ postinstructions = (koniec)
</block>


<trial cwiczenie>
/ stimulusframes = [1=tribond_cw1]
/ validresponse = ("D";"K")
</trial>

<text tribond_cw1>
/ items = ("Cwiczenie")
/ position = (50%,50%)
</text>


<trial tribond1>
/ stimulusframes = [1=tekst]
/ validresponse = ("D";"K")
</trial>

<text tekst>
/ items = ("Tresc tribond 1")
/ position = (50%,50%)
</text>


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

The trick is to use an empty <item> element to store the previous 'yes' answers. Here's some example code for you:


<values>
/ stopblock = 0
</values>

<text yes>
/ items = ("D = Yes")
/ position = (25%, 90%)
</text>

<text no>
/ items = ("K = No")
/ position = (75%, 90%)
</text>

<block firstblock>
/ bgstim = (yes, no)
/ trials = [1-4=showquestion]
</block>

<block secondblock>
/ skip = [text.yesanswer.itemcount==0]
/ stop = [values.stopblock==1]
/ trials = [1=elaborate]
</block>

<expt myexpt>
/ blocks = [1=firstblock; 2=secondblock]
</expt>

<trial showquestion>
/ ontrialend = [if(trial.showquestion.response==32)
    item.yesanswers.item=text.question.currentitem]
/ stimulusframes = [1=question]
/ validresponse = ("d", "k")
</trial>

<text question>
/ items = questions
</text>

<item questions>
/ 1 = "Do you like bananas?"
/ 2 = "Do you drink coffee?"
/ 3 = "Do you like cats?"
/ 4 = "Do you like dogs?"
</item>

<openended elaborate>
/ ontrialend = [if(text.yesanswer.unselectedcount==0)values.stopblock=1]
/ stimulusframes = [1=elaborate1, yesanswer, elaborate2]
/ position = (50%, 80%)
/ size = (50%, 30%)
/ branch = [openended.elaborate]
</openended>

<text elaborate1>
/ items = ("You answered 'Yes' when asked")
/ position = (50%, 30%)
</text>

<text yesanswer>
/ items = yesanswers
/ position = (50%, 35%)
</text>

<text elaborate2>
/ items = ("Please tell us why:")
/ position = (50%, 40%)
</text>

<item yesanswers>
</item>


Regards,


~Dave


Kuba S
Kuba S
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 16, Visits: 1

Hi it's great! :)


However, questions from :


<item questions>
/ 1 = "Do you like bananas?"
/ 2 = "Do you drink coffee?"
/ 3 = "Do you like cats?"
/ 4 = "Do you like dogs?"
</item>


are showned in random order. I tried with sequence option, but it doesn't work. Any suggestions?


Regards,
k


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


<text question>
/ items = questions
/ select = sequence
</text>


Working as expected for me.


Kuba S
Kuba S
Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)Esteemed Member (1.5K reputation)
Group: Forum Members
Posts: 16, Visits: 1

My fault...


Thank you very much!


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search