False alarms in simple reaction time task


Author
Message
Andrea_j
Andrea_j
Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)
Group: Forum Members
Posts: 2, Visits: 15
Hi,
I want to use the simple visual reaction time task as found here: http://www.millisecond.com/download/library/SimpleReactionTime/

The task consists of the presentation of a fixation cross (focus) followed by the target (a red circle).
Subjects have to press the spacebar when the target appears and the latency is logged.

I want to be able to identify false starts, where the subjects presses the spacebar before the red circle stimulus appears. It currently only logs the RT after the red circle appears, since that is the last stimulus.
When I adjust the beginresponseframe to start at the presentation of the focus stimulus it skips to the next trial when the subject presses the key. I want to log that the false start happened but the trial should continue and the RT should be recorded from the moment the target stimulus appears.
How can I add this to the script?

Thanks, I hope my question is clear.

original code:
<trial SRTT>
/ ontrialbegin = [if (values.fixed == 1)
{values.targetx = list.targetposition.nextvalue;
values.targety= list.targetposition.nextvalue}]

/ ontrialbegin = [values.stiminterval = list.stimulusinterval.nextvalue]
/ontrialbegin = [trial.SRTT.insertstimulustime(shape.targetcircle, values.stiminterval)]
/ stimulustimes = [0 = focus]
/ validresponse = (57)
/ correctresponse = (57)
/ ontrialend = [trial.SRTT.resetstimulusframes()]
/ branch = [trial.SRTT]
/ pretrialpause = values.pause
</trial>

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: 100K
> I want to log that the false start happened but the trial should continue and the RT should be recorded from the moment the target stimulus
> appears

Well, you can't easily have both. In order to be able to detect and log the "false start", the trial must be set to accept responses from the start (/beginresponsetime = 0). That also means that latency will be measured relative to the start of the trial, not relative to the display time of the actual target stimulus (the red dot) later in the trial.

With a bit of moderately elaborate /isvalidresponse logic you can log the false start and correct the trial's *individual* latency:

<trial SRTT>
/ ontrialbegin = [if (values.fixed == 1)
                            {values.targetx = list.targetposition.nextvalue;
                            values.targety= list.targetposition.nextvalue}]

/ ontrialbegin = [values.stiminterval = list.stimulusinterval.nextvalue;
    values.correctedlatency = 0; values.falsestart = false; ]
/ontrialbegin = [trial.SRTT.insertstimulustime(shape.targetcircle, values.stiminterval)]
/ stimulustimes = [0 = focus]
/ beginresponsetime = 0
/ validresponse = (57)
/ isvalidresponse = [if(trial.srtt.response == 57 && trial.srtt.latency <= values.stiminterval) {values.falsestart=true; false; }
    else if (trial.srtt.response == 57 && trial.srtt.latency > values.stiminterval) {values.correctedlatency = trial.srtt.latency - values.stiminterval; true; }]

/ correctresponse = (57)
/ ontrialend = [trial.SRTT.resetstimulusframes()]
/ branch = [trial.SRTT] 
/ pretrialpause = values.pause
</trial>

See the attached script for details and look at the added values falsestart and correctedlatency logged to the data file. However, all the *built-in* aggregate properties logged to the data file (trial.SRTT.meanlatency, trial.SRTT.medianlatency, etc.) operate on the latency measured from the *beginning of the trial* (i.e., what you find in the standard 'latency' column) and are thus relatively useless.

You'd have to re-calculate those aggregate measures (means, medians, etc.) from the corrected latency values logged to the file using your preferred statistical analysis application.

Attachments
SRTVisual.iqx (751 views, 16.00 KB)
Edited 8 Years Ago by Dave
Andrea_j
Andrea_j
Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)
Group: Forum Members
Posts: 2, Visits: 15
Hi Dave,

Thank you so much, it works perfectly now! 
I understand what you did now i see it, but I could not have adjusted it myself, so thank you for your very quick solution. 


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: 100K
Great. Here's another option to consider. The problems regarding the point latency is measured relative to actually go away if you split the fixation-period (during which a false start may happen) and the target-presentation into two separate <trial> elements:

**************************************************************
FOCUS TRIAL
**************************************************************
<trial fixation>
/ ontrialend = [if (trial.fixation.response != 0) values.falsestart=true else values.falsestart=false]
/ pretrialpause = values.pause
/ ontrialbegin = [values.stiminterval = list.stimulusinterval.nextvalue; ]
/ stimulustimes = [0 = focus]
/ validresponse = (0,57)
/ trialduration = values.stiminterval
/ recorddata = false
/ branch = [trial.srtt]
</trial>

**************************************************************
TARGET TRIAL
**************************************************************
Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for pressing the spacebar.

<trial SRTT>
/ ontrialbegin = [if (values.fixed == 1)
                            {values.targetx = list.targetposition.nextvalue;
                            values.targety= list.targetposition.nextvalue}]

/ stimulustimes = [0 = targetcircle]
/ validresponse = (57)
/ correctresponse = (57)
/ branch = [trial.fixation] 
</trial>

Full details in the attached file.

Attachments
SRTVisual.iqx (748 views, 16.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search