Setting the stage
1
Introduction
1.1
What does your theory say about your data?
1.2
What do your data say about your theory?
1.3
What do your parameters say about other things?
1.4
What does your expertise say about your parameters?
2
Getting started in
Stan
2.1
Installation in
R
2.2
The anatomy of a
Stan
program
2.2.1
Data block
2.2.2
Transformed data block
2.2.3
Parameters block
2.2.4
Model block
2.2.5
Generated quantities block
2.2.6
The final product
2.3
Estimating a model
2.4
Looking at the results
3
Probabilistic models of behavior
3.1
The problem with deterministic models
3.2
What
is
a probabilistic model?
3.3
Example dataset and model
3.4
Optimal choice plus an error
3.4.1
Estimating a model
3.5
Utility-based models
3.5.1
Estimating a model
3.5.2
Doing something with the estimates
4
Considerations for choosing a prior
4.1
Example model and experiment
4.2
Getting the support right
4.3
Eliciting reasonable priors
4.3.1
Parameter values and the prior pushforward check
4.3.2
Predictions and other derived quantities: The prior predictive check
4.4
Assessing the sampling performance of a prior
4.4.1
Does our model recover its parameters well?
4.4.2
Do we see any pathologies in the estimation process?
4.5
R
code used for this chapter
Building blocks
5
Representative agent and participant-specific models
5.1
Participant-specific models
5.1.1
Example data and economic model
5.1.2
Going to the probabilistic model
5.1.3
A short side quest into canned estimation techniques
5.1.4
Assigning priors
5.1.5
Estimating the model for one participant
5.1.6
Estimating the model for all participants
5.1.7
But we could be learning more!
5.2
Actual representative agent models (pooled models)
6
Hierarchical models
6.1
A random sample of participants walks into your lab
6.2
The anatomy of a basic hierarchical model
6.3
Accounting for unobserved heterogeneity
6.3.1
The last time you will integrate the likelihood, probably
6.3.2
Data augmentation
6.4
A multivariate normal hierarchical model
6.4.1
Decomposing the variance-covariance matrix
6.4.2
Transformed parameters and normal distributions
6.5
Example: again with
Bruhin, Fehr, and Schunk (2019)
6.5.1
No correlation between individual-level parameters
6.5.2
Correlation between individual-level parameters
7
Mixture models
7.1
A menu of models
7.2
Dichotomous and toolbox mixture models
7.3
Coding peculearities
7.4
Example experiment:
Andreoni and Vesterlund (2001)
7.4.1
As basic as it gets
7.4.2
Adding some heterogeneity
7.5
Some code used to estimate the models
8
Speeding up your
Stan
code
8.1
Example dataset and model
8.2
A really slow way to estimate the model
8.3
Pre-computing things
8.4
Vectorization
8.5
Within-chain parallelization with
reduce_sum()
8.6
Evaluating the implementations
8.6.1
Pre-computing and vectorization
8.6.2
Within-chain parallelization
8.7
R
code to estimate models
8.7.1
Slow, pre-computed, and vectorized models
8.7.2
Parallelized model
Applications
9
Application: Experience-Weighted Attraction
9.1
The model at the individual level
9.2
Some computational and coding issues
9.3
Representative agent models
9.3.1
Prior calibration
9.3.2
The
Stan
model
9.3.3
Results
9.4
Hierarchical model
9.4.1
Prior calibration
9.4.2
The
Stan
model
9.4.3
Results
9.5
Some code used to estimate the models
9.5.1
Loading the data
9.5.2
Estimating the representative agent models
9.5.3
Estimating the hierarchical model
10
Application: Strategy Frequency Estimation
10.1
Simplifying the individual likelihood functions
10.2
Example experiment:
Dal Bó and Fréchette (2011)
10.2.1
The SFEM with homogeneous trembles
10.2.2
Adding heterogeneous trembles and integrating the likelihood
10.3
R
code to do these estimations
11
Computing Quantal Response Equilibrium
11.1
Overview of quantal response equilibrium
11.2
Computing Quantal Response Equilibrium
11.2.1
Setting up the problem
11.2.2
A predictor-corrector algorithm
11.2.3
Initial conditions
11.2.4
Algorithm tuning
11.3
The predictor-corrector algorithm in
R
11.4
Some example games
11.4.1
Generalized matching pennies
(Ochs 1995)
11.4.2
Stag hunt
11.4.3
\(n\)
-player Volunteer’s Dilemma imposing symmetric strategies
12
Application: Quantal Response Equilibrium and the Volunteer’s Dilemma
(Goeree, Holt, and Smith 2017)
12.1
Solving logit QRE and estimating the model
12.2
Adding some heterogeneity
12.2.1
Computing quantal response equilibrium with heterogeneous parameters
12.2.2
Warm glow volunteering
12.2.3
Duplicate aversion
12.2.4
Results
12.3
R
code to run estimations
13
Application: Level-
\(k\)
models
13.1
Data and game
13.2
The level-
\(k\)
model
13.2.1
The deterministic component of the model
13.2.2
Exact and probabilistic play
13.3
Assigning probabilities to types for each participant separately
13.3.1
The
Stan
program
13.3.2
Prior calibration
13.3.3
Results
13.4
Doing the averaging within one program
13.4.1
The
Stan
program
13.4.2
Results
13.5
A mixture model
13.5.1
Stan
program
13.5.2
A prior for
\(\psi\)
13.5.3
Results
13.6
A mixture over levels and hierarchical nuisance parameters
13.6.1
Prior calibration
13.6.2
Stan
program
13.6.3
Results
13.7
A different assumption about mixing
13.7.1
Stan
program
13.7.2
Results
13.8
R
code to estimate the models
13.8.1
Participant-specific estimation conditional on
\(k\)
with Bayesian model averaging
13.8.2
Participant-specific estimation with a prior over
\(k\)
13.8.3
Mixture model
13.8.4
Hierarchical model
13.8.5
Mixture model with beliefs consistent with truncated type distribution
14
Application: Estimating risk preferences
14.1
Example dataset
14.2
We might not just be interested in the parameters
14.3
Introducing some important models
14.3.1
Expected utility theory
14.3.2
Rank-dependent utility
(Quiggin 1982)
14.3.3
Comparing the certainty equivalents estimated using EUT and RDU
14.4
A hierarchical specification
14.4.1
Population-level estimates
14.4.2
Participant-level estimates
14.5
R
code used to estimate these models
15
Application: Meta-analysis using (some of) the METARET data
15.1
Data
15.2
A basic model
15.3
But the data are really interval-valued!
15.4
Heterogeneous standard deviations
15.5
Student-
\(t\)
distributions, because why not?
15.6
R
code to estimate the models
Links to data
References
Structural Bayesian Techniques for Experimental and Behavioral Economics
Setting the stage