Reply To: Randomization by feature and by item

PennController for IBEX Forums Support Randomization by feature and by item Reply To: Randomization by feature and by item

#9594
Jeremy
Keymaster

Hi,

One option is to report the features in your table (as you are currently doing in Features_SemVerMixed.csv) and label your items accordingly: newTrial( row.Feature + "-" + row.Item ,

Then you can reference the labels in your Sequence command. This would show items 1-to-5 in a fixed order for each feature, with the feature groups of items randomized:

features = [...new Array(10)].map((v,n)=>startsWith("Feature "+Number(n+1)))
fisherYates(features)
Sequence("WelcomeConsent",
    "counter",
    "demographics",   
    "instructions1",
    "exercise",
    "startofexp",
    ...features,
    SendResults(),
    "Bye");

If you would like to additionally randomize the order of the items within each feature group, replace the first line with:

features = [...new Array(10)].map((v,n)=>randomize(startsWith("Feature "+Number(n+1))))

Jeremy