Counterbalanced sides
Show a fixed pair of stimuli with the left and right assignment drawn once per participant, and score the choice correctly whichever side the target lands on.
When to use it
Section titled “When to use it”Use this when two stimuli must appear side by side but which one is on the left has to vary across participants rather than across repetitions: two-alternative forced choices where side is a nuisance variable, preference pairs, or same-different displays. The crucial property is that the side assignment is drawn ONCE per session, so a participant sees a consistent layout while the sample as a whole is counterbalanced; and that scoring follows the stimulus, not the side.
Trial file
Section titled “Trial file”| type | content | stimFormat | stim | stimOrder | stimPos | key | button1 |
|---|---|---|---|---|---|---|---|
| instructions | Click the animal that is a DOG. The pictures switch sides from person to person. | NEXT | |||||
| test | .jpg | dog1;cat1 | random(within 2) | -200 0;200 0 | stim1 | ||
| test | .jpg | dog2;cat2 | random(within 2) | -200 0;200 0 | stim1 | ||
| test | .jpg | dog3;cat3 | random(within 2) | -200 0;200 0 | stim1 |
type,content,stimFormat,stim,stimOrder,stimPos,key,button1 instructions,Click the animal that is a DOG. The pictures switch sides from person to person.,,,,,,NEXT test,,.jpg,dog1;cat1,random(within 2),-200 0;200 0,stim1, test,,.jpg,dog2;cat2,random(within 2),-200 0;200 0,stim1, test,,.jpg,dog3;cat3,random(within 2),-200 0;200 0,stim1,
How it works
Section titled “How it works”Each row lists the target first and the foil second in stim, and places the two display slots at -200 0 and 200 0 through stimPos. stimOrder = random(within 2) treats the whole two-item list as one unit and shuffles inside it, which for a pair simply means: half of participants get the authored order, half get it swapped. The draw happens once at the start of the session, so one participant’s sides stay consistent for the whole run, and the arrangement each participant actually saw is recorded in the stimOrder_actual results column.
This once-per-session draw is the difference from putting the bare random keyword in stimOptions: the keyword reshuffles at every display, which counterbalances across trials rather than across participants, and re-rolls a repeated trial every time it comes back.
Scoring survives the swap because key = stim1 refers to the STIMULUS authored first (the dog), not to a screen position. With no keyboard, buttons, or response type on a multi-image test row, the images themselves are the response: the participant clicks one, and the trial is scored correct when the clicked image is the authored stim1, wherever it was displayed.
Variations
Section titled “Variations”- Counterbalance across trials instead of participants: replace the
stimOrdercell withstimOptions = randomfor a fresh shuffle at every display. - A sequence of pairs inside one trial: list all the stimuli in
stim, addstimScreens = 2, and usestimOrder = random(within screens); the screens keep their fixed composition and order while sides shuffle independently within every screen. - Keyboard responses instead of clicks: side-contingent keys cannot be authored per row when sides vary, so keep clicks, or author both side variants as separate rows with explicit
keyletters and sample between them. - Triads instead of pairs: three stimuli with
random(within 3)and a three-slotstimPos.