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 (2020), "Full-Information Estimation of Heterogeneous Agent Models Using Macro and Micro Data", https://scholar.princeton.edu/mikkelpm/het_agents (paper + online appendix)
Acknowledgements: We build on the excellent Dynare code kindly made available by Thomas Winberry (see also Winberry, QE 2018)
Requirements: Dynare version 4.6.x
Tested in: Matlab R2020a on Windows 10 PC and Linux servers (64-bit) with Dynare 4.6.1
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