Skip to content

A general-purpose library for implementing counterbalancing for web-based and lab-based behavioral experiments

Notifications You must be signed in to change notification settings

jhan0127/counterbalancing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Counterbalancing

Library for implementing counterbalancing for web-based experiments

How to create an experiment with a color variable and a shape variable

color = {}
shape = {}
shape["choices"] = ["square", "circle"]
shape["conditioned_on"] = []
shape["name"] = "shape"
color["choices"] = ["green", "blue"]
color["conditioned_on"] = [shape]
color["name"] = "color"

e = Experiment ([color, shape])
e.assign(1)
Output: {'color': 'green', 'shape': 'circle'}
e.assign(1)
Out: {'color': 'green', 'shape': 'circle'} # same user id gets same assignment
e.assign(2)
Out: {'color': 'blue', 'shape': 'square'}

About

A general-purpose library for implementing counterbalancing for web-based and lab-based behavioral experiments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published