Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Select different components for different conditions

Hi, I've created an experiment in JATOS using jsPsych. I'm anticipating that I may need multiple conditions in my study, and was thinking that I would create specific components for Condition 1, Condition 2, etc. and that I would select the appropriate components for a participant before generating their study link and sending it to them.

I've got the components created, but it seems that when I send out a participant link, the components that were selected are not "remembered". If I were to send a participant a link for Condition 1 and then change my component selection (for example, to run someone else in Condition 2), and then the participant opened their link after I made the re-selection, then they would see Condition 2.

Is there a way to have a link preserve the components that were selected at the time the link was sent out?

Or is there a better way that I should be setting up my conditions?

Thanks for any help you can offer,

-Kelly

Comments

  • Hi Kelly,

    Yes, what you described is intended. This way you can change the properties of the study without having to change the link. To do what you want, there are several options. I describe two here:

    • The easiest, no-coding: Simply clone your study. Go to More -> Clone. You'll have two independent studies that you can change and each will have an independent link that you can send around.
    • The more elegant solution, requires a tiny bit of coding: Create a second batch in your study. Go to Study and Batch Manager -> New Batch. (A batch is intended to be a group of participants doing the study, so name your second batch accordingly. Maybe BAAB, or whatever the reason for your second batch is). In the Batch properties (in the json input field) of each of these, you can now add a parameter with the corresponding value, like (I'm guessing here, the example might not apply)
    {
    "runComponent2":true, 
    "runComponent3":false
    }
    

    In your jsPsych javascript, you can then access the values of these by going to e.g. jatos.batchJsonInput.runComponent2 , which you can use as the argument for an if statement. (Here's a bit more information http://www.jatos.org/jatos.js-Reference.html#batch-variables)

    Hope this helps

    Elisa

Sign In or Register to comment.