Multiple Responses for one trial


Multiple Responses for one trial

Author
Message
maria_b1998
maria_b1998
New Member
New Member (11 reputation)New Member (11 reputation)New Member (11 reputation)New Member (11 reputation)New Member (11 reputation)New Member (11 reputation)New Member (11 reputation)New Member (11 reputation)New Member (11 reputation)

Group: Forum Members
Posts: 1, Visits: 7
Hi there, 

For my experiment I want to have 3 words pop up in 3 different locations (of a total of 6 locations) and I want the participant to rank them by clicking on them and as they click on a word it disappears and leaves the other two behind until the last one and then the experiment restarts with three different words. 

I know that it is not possible for a trial to have several responses so I have defined a trial for each of the different possibilities and then joined the trials with 3 positions to the ones of two positions using the branch item. like so: 


<trial my_trial_1_2_3>
/ validresponse = (position_1, position_2, position_3)
/ inputdevice = mouse
/ stimulusframes = [1 = position_1, position_2, position_3]
/ showmousecursor = true
/ branch = [
if (trial.my_trial_1_2_3.response == text.position_1){
trial.trial_second_response_2_3
}
else if (trial.my_trial_1_2_3.response == text.position_2){
trial.trial_second_response_1_3
}
else if (trial.my_trial_1_2_3.response == text.position_3){
trial.trial_second_response_1_2
}
]
</trial>
*****assume person clicks on position_1**********

<trial trial_second_response_2_3>
/ validresponse = (position_2, position_3)
/ inputdevice = mouse
/ stimulusframes = [1= position_2, position_3]
/ showmousecursor = true
/ branch = [
if (trial.trial_second_response_2_3.response == text.position_2){
trial.last_response_3
}
if (trial.trial_second_response_2_3.response == text.position_3){
trial.last_response_2
}
]
</trial>

*******assume person clicks on position_2******************

<trial last_response_3>
/ stimulusframes = [1=position_3]
/ validresponse = (position_3)
/ inputdevice = mouse
/ showmousecursor = true
</trial>

******
^^and i have done this for every combination and for every click possibility 

However, there are two issues with this: somehow I haven't been able to get the sequence to work when I put it into blocks and I figured if the blocks do work for every click it would change the words that are appearing (only the positions will be coherent with how I've defined in the branching). 

so my questions are: 
1. How could I put this into a block 
2. how would I have to define the list of words to keep them coherent when switching from one trial to another?

or if there is a better and easier way to this this, I would appreciate any help. 

Thank you !
Dave
Dave
Supreme Being
Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)

Group: Administrators
Posts: 9.6K, Visits: 44K
maria_b1998 - 7/1/2019
Hi there, 

For my experiment I want to have 3 words pop up in 3 different locations (of a total of 6 locations) and I want the participant to rank them by clicking on them and as they click on a word it disappears and leaves the other two behind until the last one and then the experiment restarts with three different words. 

I know that it is not possible for a trial to have several responses so I have defined a trial for each of the different possibilities and then joined the trials with 3 positions to the ones of two positions using the branch item. like so: 


<trial my_trial_1_2_3>
/ validresponse = (position_1, position_2, position_3)
/ inputdevice = mouse
/ stimulusframes = [1 = position_1, position_2, position_3]
/ showmousecursor = true
/ branch = [
if (trial.my_trial_1_2_3.response == text.position_1){
trial.trial_second_response_2_3
}
else if (trial.my_trial_1_2_3.response == text.position_2){
trial.trial_second_response_1_3
}
else if (trial.my_trial_1_2_3.response == text.position_3){
trial.trial_second_response_1_2
}
]
</trial>
*****assume person clicks on position_1**********

<trial trial_second_response_2_3>
/ validresponse = (position_2, position_3)
/ inputdevice = mouse
/ stimulusframes = [1= position_2, position_3]
/ showmousecursor = true
/ branch = [
if (trial.trial_second_response_2_3.response == text.position_2){
trial.last_response_3
}
if (trial.trial_second_response_2_3.response == text.position_3){
trial.last_response_2
}
]
</trial>

*******assume person clicks on position_2******************

<trial last_response_3>
/ stimulusframes = [1=position_3]
/ validresponse = (position_3)
/ inputdevice = mouse
/ showmousecursor = true
</trial>

******
^^and i have done this for every combination and for every click possibility 

However, there are two issues with this: somehow I haven't been able to get the sequence to work when I put it into blocks and I figured if the blocks do work for every click it would change the words that are appearing (only the positions will be coherent with how I've defined in the branching). 

so my questions are: 
1. How could I put this into a block 
2. how would I have to define the list of words to keep them coherent when switching from one trial to another?

or if there is a better and easier way to this this, I would appreciate any help. 

Thank you !

You'll want to have a simple start trial that samples the words and positions once at the start of every rating sequence. Use <list> elements and values to store the item numbers and positions, use the values for selection in your <text> elements. You'll then want to branch to a single rating trial, and you'll want to keep that trial /branch'ing to itself until all three words have been clicked.

Dave
Dave
Supreme Being
Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)Supreme Being (647K reputation)

Group: Administrators
Posts: 9.6K, Visits: 44K
Dave - 7/2/2019
maria_b1998 - 7/1/2019
Hi there, 

For my experiment I want to have 3 words pop up in 3 different locations (of a total of 6 locations) and I want the participant to rank them by clicking on them and as they click on a word it disappears and leaves the other two behind until the last one and then the experiment restarts with three different words. 

I know that it is not possible for a trial to have several responses so I have defined a trial for each of the different possibilities and then joined the trials with 3 positions to the ones of two positions using the branch item. like so: 


<trial my_trial_1_2_3>
/ validresponse = (position_1, position_2, position_3)
/ inputdevice = mouse
/ stimulusframes = [1 = position_1, position_2, position_3]
/ showmousecursor = true
/ branch = [
if (trial.my_trial_1_2_3.response == text.position_1){
trial.trial_second_response_2_3
}
else if (trial.my_trial_1_2_3.response == text.position_2){
trial.trial_second_response_1_3
}
else if (trial.my_trial_1_2_3.response == text.position_3){
trial.trial_second_response_1_2
}
]
</trial>
*****assume person clicks on position_1**********

<trial trial_second_response_2_3>
/ validresponse = (position_2, position_3)
/ inputdevice = mouse
/ stimulusframes = [1= position_2, position_3]
/ showmousecursor = true
/ branch = [
if (trial.trial_second_response_2_3.response == text.position_2){
trial.last_response_3
}
if (trial.trial_second_response_2_3.response == text.position_3){
trial.last_response_2
}
]
</trial>

*******assume person clicks on position_2******************

<trial last_response_3>
/ stimulusframes = [1=position_3]
/ validresponse = (position_3)
/ inputdevice = mouse
/ showmousecursor = true
</trial>

******
^^and i have done this for every combination and for every click possibility 

However, there are two issues with this: somehow I haven't been able to get the sequence to work when I put it into blocks and I figured if the blocks do work for every click it would change the words that are appearing (only the positions will be coherent with how I've defined in the branching). 

so my questions are: 
1. How could I put this into a block 
2. how would I have to define the list of words to keep them coherent when switching from one trial to another?

or if there is a better and easier way to this this, I would appreciate any help. 

Thank you !

You'll want to have a simple start trial that samples the words and positions once at the start of every rating sequence. Use <list> elements and values to store the item numbers and positions, use the values for selection in your <text> elements. You'll then want to branch to a single rating trial, and you'll want to keep that trial /branch'ing to itself until all three words have been clicked.

Here's a working example:

<values>
/ responses = ""
/ n = 0
/ setnumber = 1
/ ax = 0%
/ ay = 0%
/ bx = 0%
/ by = 0%
/ cx = 0%
/ cy = 0%
</values>

<block example>
/ trials = [1-2 = start]
</block>

<trial start>
/ ontrialbegin = [
values.responses = "";
values.n = 0;
text.a.textcolor = black;
text.b.textcolor = black;
text.c.textcolor = black;
values.setnumber = list.sets.nextvalue;
list.x.reset();
values.ax = list.x.nextvalue;
values.ay = list.y.nextvalue;
values.bx = list.x.nextvalue;
values.by = list.y.nextvalue;
values.cx = list.x.nextvalue;
values.cy = list.y.nextvalue;
]
/ trialduration = 0
/ recorddata = false
/ branch = [
trial.ranktrial
]
</trial>

<trial ranktrial>
/ ontrialend = [
values.responses = concat(values.responses, trial.ranktrial.response);
values.n += 1;
]
/ ontrialend = [
if (trial.ranktrial.response == "a") {
text.a.textcolor = white;
}
else if (trial.ranktrial.response == "b") {
text.b.textcolor = white;
}
else if (trial.ranktrial.response == "c") {
text.c.textcolor = white;
};
]
/ stimulusframes = [1=a,b,c]
/ validresponse = (a,b,c)
/ isvalidresponse = [
!contains(values.responses, trial.ranktrial.response)
]
/ inputdevice = mouse
/ branch = [
if (values.n < 3) trial.ranktrial;
]
</trial>

<text a>
/ items = aitems
/ select = values.setnumber
/ hposition = values.ax
/ vposition = values.ay
/ erase = false
</text>

<text b>
/ items = bitems
/ select = values.setnumber
/ hposition = values.bx
/ vposition = values.by
/ erase = false
</text>

<text c>
/ items = citems
/ select = values.setnumber
/ hposition = values.cx
/ vposition = values.cy
/ erase = false
</text>

<item aitems>
/ 1 = "A1"
/ 2 = "A2"
</item>

<item bitems>
/ 1 = "B1"
/ 2 = "B2"
</item>

<item citems>
/ 1 = "C1"
/ 2 = "C2"
</item>

<list sets>
/ items = (1,2)
</list>

<list x>
/ items = (40%, 60%, 80%, 40%, 60%, 80%)
/ selectionrate = always
</list>

<list y>
/ items = (45%, 45%, 45%, 55%, 55%, 55%)
/ selectionrate = always
/ selectionmode = list.x.currentindex
</list>

GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search