PennController for IBEX › Forums › Support › Response time on comprehension questions › Reply To: Response time on comprehension questions
Good morning,
There sure are alternative/additional ways, but subtracting the two timestamps is probably the most accurate measure you can get: each timestamp reports when the event happened, to the millisecond (modulo browser lag). In your case, you know that the participant pressed a key almost exactly one second (1072ms) after the main Canvas element was displayed. Subtracting the timestamps is a simple operation in R (line 7).
If you really need to report the RT at the end of every row, you can use a global Var element that you set to Date.now() when printing the Canvas and whose value you subtract to Date.now() after selection happened, and you can log it on your newTrial:
Template("fullstim.csv",
row => ["fullstim",
"DashedSentence", {s: row.Sentence},
"PennController", newTrial("experiment",
defaultImage
.size(500,350)
,
newImage("male", row.MaleImageFile)
,
newImage("female", row.FemaleImageFile)
,
newCanvas(1000,500)
.add( -50 , 0 , newCanvas("left" , 500, 500) )
.add( 475 , 0 , newCanvas("right", 500, 500) )
.print()
.log()
,
newVar("RT").global().set( v=>Date.now() )
,
newCanvas(50,50)
.add(180,-100, newText("(A)"))
.add(700,-100, newText("(B)"))
.print()
,
getCanvas("left").add( 0 , 0 , getImage(row.LeftPicture))
,
getCanvas("right").add( 0, 0 , getImage(row.RightPicture))
,
newSelector()
.disableClicks()
.add( getImage(row.LeftPicture) , getImage(row.RightPicture) )
.keys( "A" , "B" )
.log()
.wait()
.test.selected( getImage(row.Target) )
.success( newText("Correct! Remember, <i> faire </i> plus the infinitive shows that the object performs the action. Otherwise, the subject performs the action.").css("font-size","1.5em").print() )
.failure( newText("Incorrect! Remember, <i> faire </i> plus the infinitive shows that the object performs the action. Otherwise, the subject performs the action.").css("font-size", "1.5em").print() )
,
getVar("RT").set( v=>Date.now()-v )
,
newButton("Next").print().wait()
)
.log('Item', row.Sentence)
.log('Group', row.Group)
.log('RT', getVar("RT"))
])
Jeremy