Skip to content

Random assignment of the participants to the experiment lists? #825

Answered by jodeleeuw
zhangchi199133 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @zhangchi199133 ,

If you've got a separate timeline created for each condition, then you could randomly select one of those timelines like this:

var timeline_condition_a = [...];
var timeline_condition_b = [...];
var timeline_condition_c = [...];

var random_timeline = jsPsych.randomization.sampleWithoutReplacement([timeline_condition_a, timeline_condition_b, timeline_condition_c], 1)[0];

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zhangchi199133
Comment options

Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants