repeat trial with certain response


repeat trial with certain response

Author
Message
Jerri
Jerri
Associate Member
Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)

Group: Forum Members
Posts: 16, Visits: 1


Hello!


I would like my subjects to have the possibility to repeat a trial when hitting a certain key like "space".


The branch command that i have built in below does not work. Can anyone help?


Thanks a lot!


<trial a1>


/ trialcode = "a1" 


/ stimulustimes = [1=start; 801=blank; 1051=square1]


/ branch = [if (trial.a1.response = 57) trial.a1]


/ validresponse = (42,54,57)


/ correctresponse = (42)


</trial>



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

Well, how do you come to the conclusion that it doesn't work? I think you'll have to share a more detailed overview of the procedure you're trying to implement.


~Dave


Jerri
Jerri
Associate Member
Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)

Group: Forum Members
Posts: 16, Visits: 1

Ok, well what i want to do is to give the subjects the opportunity to repeat the trial if they feel like they have not understood the text that is presented within the trial. so what i wish to happen is that if the subjects press one of the shift keys, those responses should be logged as a response in the data file. however, if they press the space bar, the trial should start again from the beginning.


with the branch command i have built in, this does not work, inquisit tells me this: " Expression 'trial.a1.response' is invalid. The expression attempts to set the value of read-only property."


So what i am guessing is that the command for "when subject hits "57" " that i put in is wrong. 


I hope that makes the problem clearer!


Thanks a lot!



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

The error message is informative. For starters set:


/ branch = [if (trial.a1.response == 57) trial.a1]


The '=' is an assignment operator, while '==' is a comparison operator.  That should fix the error message and make the branch functional. However, if any of the stims (i.e. start, blank, square1) has more than one item, the repeated trial will display a different item than its first instance (unless you've taken precautions against this).


~Dave


Jerri
Jerri
Associate Member
Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)Associate Member (245 reputation)

Group: Forum Members
Posts: 16, Visits: 1

It works!


Thank you very very much!


S F
S F
Partner Member
Partner Member (792 reputation)Partner Member (792 reputation)Partner Member (792 reputation)Partner Member (792 reputation)Partner Member (792 reputation)Partner Member (792 reputation)Partner Member (792 reputation)Partner Member (792 reputation)Partner Member (792 reputation)

Group: Forum Members
Posts: 27, Visits: 166
Dave - 12/9/2009

The error message is informative. For starters set:

/ branch = [if (trial.a1.response == 57) trial.a1]

The '=' is an assignment operator, while '==' is a comparison operator.  That should fix the error message and make the branch functional. However, if any of the stims (i.e. start, blank, square1) has more than one item, the repeated trial will display a different item than its first instance (unless you've taken precautions against this).

~Dave


Hi Dave, thanks so much for this answer. I was wondering about the last thing you said- how would we take precautions against the stim loading different items? I'd like to repeat an item if subjects get it wrong, but after showing an error message.
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
S F - 6/19/2019
Dave - 12/9/2009

The error message is informative. For starters set:

/ branch = [if (trial.a1.response == 57) trial.a1]

The '=' is an assignment operator, while '==' is a comparison operator.  That should fix the error message and make the branch functional. However, if any of the stims (i.e. start, blank, square1) has more than one item, the repeated trial will display a different item than its first instance (unless you've taken precautions against this).

~Dave


Hi Dave, thanks so much for this answer. I was wondering about the last thing you said- how would we take precautions against the stim loading different items? I'd like to repeat an item if subjects get it wrong, but after showing an error message.

You'll have to do something like this:

<values>
/ exampleitem = 1
</values>

<block exampleblock>
/ trials = [1-4 = example]
</block>

<trial example>
/ ontrialbegin = [if (trial.example.trialcount < 1 || trial.example.correct) values.exampleitem = list.items.nextindex]
/ stimulusframes = [1=examplestimulus]
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ errormessage = true(errormsg, 1000)
/ branch = [if (trial.example.error) trial.example]
</trial>

<list items>
/ poolsize = 4
</list>

<text examplestimulus>
/ items = exampleitems
/ select = values.exampleitem
</text>

<item exampleitems>
/ 1 = "Example A"
/ 2 = "Example B"
/ 3 = "Example C"
/ 4 = "Example D"
</item>

<text errormsg>
/ items = ("X")
/ txcolor = red
/ position = (50%, 75%)
</text>

I.e. only select a new item number if the response given in the previous instance of the trial was correct.

GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search