Matlab code for full-information Bayesian inference in heterogeneous agent models using both (i) macro time series data and (ii) repeated cross sections of micro data
Reference: Liu, Laura, and Mikkel Plagborg-Møller (2022), "Full-Information Estimation of Heterogeneous Agent Models Using Macro and Micro Data", arXiv:2101.04771
Requirements: Dynare version 4.6.x
Tested in: Matlab R2020a on Windows 10 PC and Linux servers (64-bit) with Dynare 4.6.1
doc: documentation
- hh.md: documentation of code for heterogeneous household model
- firm.md: documentation of code for heterogeneous firm model
program: Matlab routines
- run_mcmc_hh.m: simulate and estimate heterogeneous household model
- run_mcmc_firm.m: simulate and estimate heterogeneous firm model
- plot_mcmc.m: plot estimation output
- run_likelihood_hh.m: compute likelihood functions (for various observables) in heterogeneous household model
- plot_likelihood.m: plot likelihood functions
program/functions: general functions for MCMC, likelihood evaluation, simulations, and plotting
- likelihood/loglike_compute.m: main function for numerically unbiased likelihood estimate
program/hh_model: files specific to the heterogeneous household model
- dynare: sub-folder with Dynare model files adapted from Winberry (2018)
- auxiliary_functions/likelihood/likelihood_micro.m: micro likelihood function
program/firm_model: files specific to the heterogeneous firm model
- dynare: sub-folder with Dynare model files adapted from Winberry (2018)
- auxiliary_functions/likelihood/likelihood_micro.m: micro likelihood function
We build on the excellent Dynare code kindly made available by Thomas Winberry (see also Winberry, QE 2018).
Plagborg-Møller acknowledges that this material is based upon work supported by the National Science Foundation under Grant #1851665.