There are some blocks that I want to keep in a fixed order, but others that should be random (ideally counterbalanced).
I'm working on an IAT, so some participants should get a congruent block first, and others should get an incongruent block first. Another way to do this might be to assign people to a condition at the beginning (either congruent1 or congruent2) and base the block order on that condition - not sure what the best approach is.
Any tips on how to implement this as simply as possible are appreciated!
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/b11b242b-51b5-4ff1-be11-a4ed2caf3e9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This line seems to not be working though:
timeline = timeline.concat(random_order);
I get the error: "Uncaught Error: Invalid experiment structure definition. One or more trials is missing a 'type' parameter. "
If I instead do
timeline = timeline.concat(block1, block2)
that works, which tells me there's something happening when I shuffle the array of blocks and try to add it to the timeline.
Any ideas on what I'm doing wrong here?
I am also a huge fan of JsPsych! I had a similar question about randomizing block order. I am not trying to randomize the trials within a block. I have attached my code.
/* Blocks */
var experiment = [];
experiment.push(pineapple1, pineapple2, pineapple3, pineapple4, pineapple5);
experiment.push(orange1, orange2, orange3, orange4, orange5);
experiment.push(debrief_block);
/* Run the experiment */
function startExperiment(){
jsPsych.init({
experiment_structure: experiment,
display_element: $('#jspsych-target'),
on_finish: function() {
jsPsych.data.displayData();
}
});
}
I am trying to rotate the pineapple and orange blocks. I need pineapple blocks 1-5 to stay in order and orange blocks 1-5 to stay in order. I then need to rotate whether pineapple or orange blocks display first. All orange and pineapple blocks use the single-stim plugin.
Randomized ex:
var experiment = [];
experiment.push(orange1, orange2, orange3, orange4, orange5);
experiment.push(pineapple1, pineapple2, pineapple3, pineapple4, pineapple5);
experiment.push(debrief_block);
I feel like it is pretty easy to random these blocks, and I trying to learn more about jsPsych. Thank you for any help!
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/5ff3c604-020b-4aa0-852a-36d4608a9355%40googlegroups.com.
I figured out how to incorporate randomization of blocks into my experiment now. JsPsych is awesome!
Nested Arrays!