Tutorials#

The tutorials are a learning path through the core workflow of computational modelling with cpm. Work through them in order: each one builds on the previous. If you have never used cpm before, do the cpm in five minutes first.

Beginner 30 min

1. Build and fit your first model

Build a reinforcement learning model of a two-armed bandit task from cpm components, fit it to data from many participants, and simulate new behaviour from the fitted parameters.

1. Build and fit your first model: the two-armed bandit

Beginner 20 min

2. Parameter recovery

Check whether the parameters of a model can be estimated reliably: simulate data from known parameters, fit the model, and compare.

2. Parameter recovery

Intermediate 30 min

3. Model recovery and model comparison

Check whether competing models can be told apart, compare them with penalised likelihoods, and map the landscape of their predictions.

3. Model recovery and model comparison

Advanced 40 min

4. Hierarchical estimation I: empirical Bayes

Estimate group-level priors from the data and use them to regularise the parameter estimates of each participant.

4. Hierarchical estimation I: empirical Bayes

Advanced 40 min

5. Hierarchical estimation II: variational Bayes

Estimate the group distribution of the parameters together with its uncertainty, and test group-level means.

5. Hierarchical estimation II: variational Bayes