Question about reaction times

PennController for IBEX Forums Support Question about reaction times

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10706
    marisolmuru
    Participant

    Hi!

    I’m trying to analize the results obtained from an experiment I’ve already carried out and I’m confused about the reactions times.

    Here is the link to the exp. https://farm.pcibex.net/r/gMCzhx/ and here the relevant code:

    newTrial("experimento",
        newText("*").center().css("font.size", "x-large").print()
        ,
        newKey(" ").wait().log("all").disable()
        ,
        getText("*").remove()
        ,
        newController("DashedSentence", {s : row.oracion}).center().print().log().wait().remove()
        ,
        n_question = 1+Math.floor(Math.random()*4)
        ,
        newText("q", row['Q'+n_question])
          .center()
          .print()
        ,
        newText("flecha1","<p>&#8592 NO</p>").cssContainer("border-bottom", "solid 1px white").print("center at 25vw", "bottom at 60vh")
        ,
        newText("flecha2","<p>SÍ &#8594</p>").cssContainer("border-bottom", "solid 1px white").print("center at 75vw", "bottom at 60vh")
        ,
        newKey("pressOnArrow", "ArrowLeft", "ArrowRight")
        .log()
        .wait()
        ,
        getKey("pressOnArrow")
        .test.pressed( row['C'+n_question] )
            .success( getVar("ACCURACY").set(v=>[...v,true]) ) 
            .failure( getVar("ACCURACY").set(v=>[...v,false]))
            .log()
    )
        .log("item", row.item)
        .log("grupo", row.Group)
        .log("verbo", row.verbo)
        .log("amb", row.amb)
        .log("ro", row.ro)
        .log("cond", row.cond)
        .log("n_question", n_question)
        .log("question", row['Q'+n_question])
        .log("correct", row['C'+n_question])
    )

    I’m trying to determine how to calculate the time between the apparition of the controllers newText(“q”, row[‘Q’+n_question]) and the newKey(“pressOnArrow”, “ArrowLeft”, “ArrowRight”) controller, which I logged, and the time when the participant pressed the key (i.e., the end of the trial).

    In the results table I have the following info (I only copied the relevant data):

    – experimento NULL Key pressOnArrow PressedKey ARROWRIGHT 1651092307348

    and

    – experimento NULL PennController 29 _Trial_ End 1651092307358

    I just want to make sure that it’s correct to calculate the reaction time as 1651092307358 – 1651092307348 = 10.

    Thank you so much!

    M.

    #10707
    marisolmuru
    Participant

    Sorry I made a mistake in the last post, but I can’t edit it.

    I now realise that I should have used a .log in the newText(“q”, row[‘Q’+n_question]) command, to have the direct timestamp of when the question appeared (but i didn’t and I already collected data). And I understand that I was incorrectly interpreting the timestamps in the solution I proposed above.

    I’m sure, though, that there must be a way to calculate the time between the moment that the dashed-sentence controler ended (and the text with the question appared) and the moment when the participants pressed the Arrow key with the data I have. But I don’t understand what the timestamp reported in the dashed sentence means, is it when it started ot when it ended?

    Here is a more complete sample of my results.

    experimento	NULL	PennController	26	_Trial_	Start	1651092152524
    experimento	NULL	PennController	26	_Header_	Start	1651092152524
    experimento	NULL	PennController	26	_Header_	End	1651092152524
    experimento	NULL	Key	 	PressedKey	 	1651092157908
    experimento	NULL	Key	pressOnArrow	PressedKey	ARROWRIGHT	1651092196900
    						
    						
    experimento	NULL	Controller-DashedSentence	DashedSentence	1	El	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	2	rector	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	3	que	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	4	el	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	5	asesor	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	6	ayudó	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	7	quizás	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	8	abandona	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	9	su	1651092191988
    experimento	NULL	Controller-DashedSentence	DashedSentence	10	cargo.	1651092191988
    						
    experimento	NULL	PennController	26	_Trial_	End	1651092196917

    I’m really sorry for the confusion and the multiple questions but I’m confused about the timestamps and I can’t find the information in the documentation files.

    Thank you so much!

    #10709
    Jeremy
    Keymaster

    Hi,

    The timestamp that PennController reports for Controller elements corresponds to when it ended; in this case, it corresponds to when the last word disappeared. Because you printed the Text element with your question immediately after waiting for the Controller element, the timestamp reported for the latter is a good approximation of the former. S subtracting that timestamp from the timestamp of the keypress gives you 1651092196900-1651092191988=4912ms, ie. about 5s

    Jeremy

    #10710
    marisolmuru
    Participant

    Perfect! Thanks! 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.