I’m wondering if there is a way to randomise participants based on information they provide earlier on PsychoPy. For example, I’m looking to randomise based on sex, ideally to have equal numbers of males/females in each condition. So, participants may enter ‘male’ using text entry code earlier. Is it possible to do this? The reason why is so that the study is double-blind.
Anything is possible but sometimes doing this sort of thing in code can end up being a bit inflexible, but as you say, can help achieve double-blinding so can be an avenue worth pursuing.
You would need to provide more details of your design (e.g. number of subjects, and what you mean by “each condition”). And does the experimenter not know the gender of the participant? i.e. is it vital for the participant to enter this information, or can the experimenter do it?
It is likely that the experimenter will know the gender of participant, but ideally the participant would enter this themselves on PsychoPy. Ideally PsychoPy could randomise a given participant, based on what they enter for gender, to one of four conditions. E.g. If there are 3 females and 1 male in one condition, and 1 female and 3 males in another condition, PsychoPy would place a female participant in to the latter, so as to equal the conditions out. Could PsychoPy perhaps read back the information a participant inputs (gender) in the ‘pop up window’ when you press run to decide which condition? Perhaps with logical operators in the code?
We hope to recruit around 88 participants. The four conditions are all exactly the same in terms of the flow, apart for minor alterations/additions to particular routines. Therefore, for the routines in which the conditions differ, they will likely be attached using an Excel file on a random loop.
Hi,
I think what you try to achieve is possible, but I’m not sure if you can do it with the builder alone.
You can add fields to the expInfo dialog when you click on Experiment Settings in the builder. If you add a field gender with the default values ['male', 'female'] and compile the script, you will get a line similar to this