Skip to Main Content


Fitting dynamic models of learning to trial-by-trial behavioral data

Thursday, April 1, 2021 – Part I: 2:00 - 3:15 pm ; Part II: 3:30 – 5:00 pm

Passcode: MAPs

Dr. Yael Niv, Professor of Psychology and Neuroscience; Princeton Neuroscience Institute; Princeton University


How does a mood manipulation affect change in affect over time in different individuals? What are dynamic trajectories in stress resilience in healthy and clinical populations?

Dynamic models of learning can answer these questions. The workshop will address how to fit dynamic models of learning to trial-by-trial behavioral data. This method is useful for quantitatively assessing a wide variety of time-varying data where we have a model/idea about how they vary over time, and specifically, where we are interested in how they vary over time.


Fitting dynamic models of learning to trial-by-trial behavioral data is another useful approach to have in your toolkit. This method was developed around 2008 and is increasingly used in computational psychiatry. It is powerful and well-validated, and for reinforcement learning modeling of human behavior, can be currently considered as the gold standard.

Even though there are other approaches for time-varying data (such as curve-fitting methods), this method of trial-by-trial model fitting has more statistical power, and thus is more useful for the laboratory studies with a relative small number of participants.



  • Basic understanding of Bayesian inference (people who have no previous knowledge about this method can learn it during this workshop).
  • Knowledge of reinforcement learning models can definitely help, and to use the method one needs programming skills in almost any programming language (R, Python, Matlab) . No license needed if you are using a free language like R or Python; license needed if using Matlab.
  • There is a lot of open source code available, but I recommend writing your own as it is not hard and that is the only way to really understand the code and adapt it to your specific model.

Reference publications:

Datasets: Any time varying data, behavioral or neural.

Registration Information

You must subscribe to the Workshop series using your email to receive Zoom information for the virtual workshop:

Fitting dynamic models of learning to trial-by-trial behavioral data