Bayesian parameter in a life-cycle model

Paraphrasing a question I was emailed: “I have a life-cycle model. To calibrate the model I set parameters based on some econometric estimates. Some of my econometric estimates are bayesian, and so the calibrated parameter is a (posterior) distribution. How can I solve the life-cycle model with a parameter that has a distribution?”

I am going to sketch an answer where just one parameter, call it theta, has a (bayesian posterior) distribution (for simplicity, I will pretend it is just a standard normal distribution, but the actual distribution is not important for the explanation).

The idea is that you just sample from the distribution on theta to get different theta values, then solve the life-cycle model and compute model outputs/statistics for each theta, and the result is that you end up with a distribution over your model outputs/statistics. More formally,

n=100; % number of samples from the distribution on theta parameter we will take
for ii=1:n
(i) draw theta_i from N(0,1) [the distribution on theta]
(ii) solve the life-cycle model with parameter value theta_i
(iii) solve the agent dist and compute model statistics
[to make things concrete, assume we compute mean income, Y]
(iv) we now have Y_i [the model statistic for theta_i], store this
end
What we have now are n values of Y_i. This is the distribution of model statistic Y, and we could calculate things like the mean, std deviation, etc., of this distribution.

VFI Toolkit can do steps (ii) and (iii). You will need to write your own loop and steps (i) and (iv) [most of this is anyway trivial to code].


A few comments: in principle you can actually solve this in parallel, rather than as a loop. One option would be that you just sample all n values of theta_i, and then set these up as n permanent types of agent. You can then just solve them all in one [although internally VFI Toolkit would anyway just be looping over permanent type, so there is little to no point in this particular example, but you get the idea.]

This is not Bayesian estimation of the model parameters (which would require MCMC), it is solving a model which has a parameter which is a distribution rather than a scalar.

If you are reading this and know of a good resource online that has a more detailed explanation/example. Please leave a link.