Bayesian Estimation of Decision Models
Preface
In these pages, I try and provide an introduction on how to obtain Bayesian estimations of decision models using R and Stan. The text posted at this point is preliminary, and comes with absolutely no guarantees. If you spot mistakes or have questions, do not hesitate to get in touch with me.
How to use these notes
The notes are not meant to be complete or exhaustive in any way. They also come with no guarantees. In particular, Stan can be a little tricky to install and use, and may not work on some platforms in the exact way which I present here. I am afraid that I cannot help with such issues—your best bet will be to either try an alternative installation (e.g., using Rstan instead of CommandStanR), or to seek help on the Stan forum. That being said, I am interested in any mistakes or shortcomings pertaining to the text and demonstration, including but not limited to ambiguities in the exposition.
You should of course feel free to use these notes as you see fit. That being said, I recommend taking a close look at the conjugate Bayesian analysis in chapter I before moving on to the estimation parts. Unless you have already a sound understanding of this material—try testing yourself by writing down the equations for a conjugate normal estimate of a Bayesian model with endogenous mean and variance—you will miss out in terms of interpretation and understanding if you start directly from the estimations shown in chapters II and III. Questions about the relevance of the prior keep coming up, and having a sound understanding of these issues from the conjugate part will help you in dealing with these issues in a principled way later on, when models become much more complex.
Since we learn best when we make mistakes and then confront these mistakes with reality, I would also highly recommend playing around with the code, and where possible, applying it to a problem that interests you, or at least changing the parameters or applying it to different data and seeiing what that yields. While a simple reading may give you an idea where to find the information if you need it, the passive exposure it provides is typically not sufficient to master the materials. This is why I provide all the code and data with the materials (this is currently still in progress, but most of the data are publicly available at this point). Feel free to play around with them, and do not hesitate to apply the insights contained here to other data and to modify the code in a way to suit your own needs!
Citation
If you use these notes for your work, or find the text useful in developing new code, please cite these notes as follows:
Vieider, Ferdinand M. (2024). Bayesian Estimation of Decision-Making Models. URL: https://fvieider.quarto.pub/bstats/