Millisecond Forums

errormessage appears when it should'nt

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

By JulieK - 2/5/2015

Hi,

I'm programming a cognitive bias modification task, where participants read a sentence, press spacebar, read a second sentence, press spacebar, read a third sentence, press spacebar, and are then presented with a word fragment. They need to press the spacebar when they know they word, see the word fragment again, and type in the missing letter. If they type in the wrong letter, the errormessage appears.
However, the errormessage also appears when they press the spacebar for the last time. Not sure why and this shouldn't happen. Script is below.
So in trial 4 I receive the errormessage, but it should only occur in trial 5 after a wrong response.
One hypothesis is that the spacebar is still pressed in a little when trial 4 moves to trial 5, indicating a wrong response in trial 5. For example, adding a '1000 = nulltest' in both trial 4 and 5 (but not when added in either one alone) got rid of the problem (but not 500 or 10), but the reaction times to trials 4 and 5 are dependent variables in the experiment so I do not like to meddle with nulltest times to much.
Any suggestions?

<trial 0>
/ stimulustimes = [1 = prac0.1, spatie; 1000 = nulltest]
/ correctresponse = (" ")
</trial>

<trial 1>
/ stimulustimes = [1 = prac0.2, spatie; 1000 = nulltest]
/ correctresponse = (" ")
</trial>

<trial 2>
/ stimulustimes = [1 = prac0.3, spatie; 1000 = nulltest]
/ correctresponse = (" ")
</trial>

<trial 3>
/ stimulustimes = [1 = prac0.4, spatie; 1000 = nulltest]
/ correctresponse = (" ")
</trial>

<trial 4>
/ stimulustimes = [1 = prac0.5, weetwoord]
/ correctresponse = (" ")
/ validresponse = (" ")
</trial>

<trial 5>
/ stimulustimes = [1 = prac0.5, weetletter]
/ correctresponse = ("E", "e")
/ correctmessage = (pracprob1, 1000)
/ errormessage = true(error, 1000)
/ responsemode = anyresponse
/ branch = [if(trial.5.response != 18) trial.5]
</trial>

<trial 6>
/ stimulustimes = [1 = prac0.6, bgnee, bgja]
/ validresponse = ("D", "d", "K", "k")
/ correctresponse = ("D", "d")
/ errormessage = true(error, 1000)
/ posttrialpause=2000
</trial>
By Dave - 2/5/2015

<trial 5>
/ stimulustimes = [1 = prac0.5, weetletter]
/ correctresponse = ("E", "e")
/ correctmessage = (pracprob1, 1000)
/ errormessage = true(error, 1000)
/ responsemode = anyresponse
/ branch = [if(trial.5.response != 18) trial.5]
</trial>

The attribute highlighted above is your problem. Under 'anyresponse' the trial will accept any response as valid input -- that includes *key releases*. In <trial 4> you *press* the spacebar, trial immediately terminates and goes to <trial 5>. The first "response" <trial 5> will see is the spacebar's *release*, which is of course not the correct response (and hence the trial adequately throws the error message you defined).
By JulieK - 2/8/2015

thank you, this helps! i removed the / responsemode = anyresponse qualifier which fixes the problem on screen, but still the latencies are recorded.
the script was written in inquisit 3, where this problem did not occur. in inquisit 4 however, it did.

thanks again!
By Dave - 2/8/2015

> [...] but still the latencies are recorded

Why would you want latencies *not* to be recorded? I'm not sure what exactly the problem is here, so please elaborate.
By JulieK - 2/8/2015

That's just my non-native English, sorry. I DO want the latencies to be recorded. I was not sure whether they still would be after deleting the \responsemode = anyresponse line.
It comes down to the fact that I just wasn't sure what the result would be of deleting that line. I'm still not sure (the script I received from someone else to modify for my purpose, so I did not write it from scratch).
By Dave - 2/8/2015

Sorry, I still don't understand. When your run the script, you get a data file. That data file will show responses and latencies in its respective 'response' and 'latency' columns.

FWIW, none of your <trial>s except 4 define the valid responses (there are no /validresponse attributes), they only define what the correct responses are (/correctresponse). Thus all those trials will accept any key response as valid input implicitly. You may want to define proper /validresponse attributes for your trials. See the tutorials in the documentation for an introduction to those basics.

The /responsemode has nothing whatsoever to do with latencies being recorded or not.