You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to jsPsych and programming in general, and I am trying to create a browser-based experiment that uses matching to assign stimuli to conditions. However, I am struggling to figure out how to do that.
In my experiment, participants first complete a "pre-trial" in which they rate various pictures:
var scale_1 = [ "Do Not Enjoy", "Neutral", "Enjoy" ];
Then, I use the ratings to divide the images into two conditions, A and B. This division process uses matching such that, ultimately, each condition should contain about the same number of images that received a "Do Not Enjoy" rating vs a "Neutral" rating vs an "Enjoy" rating.
Unfortunately, I cannot figure out how to perform this matching procedure. I have tried many different combinations of various JavaScript and jsPsych functionalities, such as pop( ), splice( ), concat( ), jspsych.data.get( ).select('response'), and many more. However, all of them have failed.
Does anyone here have experience with matched condition assignment in jsPsych, or any idea about how to do it? If so, would you please consider sharing your ideas here?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
I am new to jsPsych and programming in general, and I am trying to create a browser-based experiment that uses matching to assign stimuli to conditions. However, I am struggling to figure out how to do that.
In my experiment, participants first complete a "pre-trial" in which they rate various pictures:
var scale_1 = [
"Do Not Enjoy",
"Neutral",
"Enjoy"
];
var pre_trial = {
timeline: [
{
type: 'survey-likert',
preamble: jsPsych.timelineVariable('image'),
questions: [
{
labels: scale_1,
prompt: "The prompt"
}
]
}
],
timeline-variables: [
{image: 'image address'},
{image: 'image address'},
{image: 'image address'},
{image: 'image address'}
]
};
Then, I use the ratings to divide the images into two conditions, A and B. This division process uses matching such that, ultimately, each condition should contain about the same number of images that received a "Do Not Enjoy" rating vs a "Neutral" rating vs an "Enjoy" rating.
Unfortunately, I cannot figure out how to perform this matching procedure. I have tried many different combinations of various JavaScript and jsPsych functionalities, such as pop( ), splice( ), concat( ), jspsych.data.get( ).select('response'), and many more. However, all of them have failed.
Does anyone here have experience with matched condition assignment in jsPsych, or any idea about how to do it? If so, would you please consider sharing your ideas here?
Beta Was this translation helpful? Give feedback.
All reactions