-
Hello, I am currently struggling to cope with missing responses in my task. I create a long timeline in a for loop that I afterwards run. However, in case of missing responses, I would like to jump to the next trial. The rough set up looks like the following:
Now, it could happen that I offer a choice in stim 2. If I receive a response, I want to continue as usual. If the participant does not respond, I would like to execute the continue statement and, as a result, not push stim 3. Best wishes, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @FabianRe1, One way to do this kind of thing is to use a timeline's In this case you'll still add stim 3 to the timeline, but you'll just only have that part of the timeline run if the right conditions are met. In most circumstances you can't conditionally add things to the timeline based on user input because the timeline is generated before |
Beta Was this translation helpful? Give feedback.
-
Hi jodeleeuw, thanks a lot for your help! I managed to get it to work.
Thanks a lot for your help. Should be good to go in the upcoming days! :) Best wishes,
|
Beta Was this translation helpful? Give feedback.
Hi @FabianRe1,
One way to do this kind of thing is to use a timeline's
conditional_function
to evaluate whether the trial should run or not.In this case you'll still add stim 3 to the timeline, but you'll just only have that part of the timeline run if the right conditions are met.
In most circumstances you can't conditionally add things to the timeline based on user input because the timeline is generated before
jsPsych.run()
is called and so there is no data available to evaluate the conditional statement. This is why theconditional_function
approach is normally needed. There is one method.addNodeToEndOfTimeline()
that allows for adding to a timeline during the experiment, but it is …