ESTIMATION of a DSGE MODEL

Similar documents
Bayesian Estimation of DSGE Models

DSGE Methods. Estimation of DSGE models: Maximum Likelihood & Bayesian. Willi Mutschler, M.Sc.

The Metropolis-Hastings Algorithm. June 8, 2012

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Building and simulating DSGE models part 2

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Inference. Jesús Fernández-Villaverde University of Pennsylvania

Bayesian Estimation of DSGE Models: Lessons from Second-order Approximations

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Computing first and second order approximations of DSGE models with DYNARE

Sequential Monte Carlo Methods (for DSGE Models)

David Giles Bayesian Econometrics

Bayesian Computations for DSGE Models

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Density Estimation. Seungjin Choi

An Introduction to Graphs in Dynare

... Econometric Methods for the Analysis of Dynamic General Equilibrium Models

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Dynamic Macro 1 / 114. Bayesian Estimation. Summer Bonn University

Sequential Monte Carlo Methods

Labor-Supply Shifts and Economic Fluctuations. Technical Appendix

Sequential Monte Carlo samplers for Bayesian DSGE models

Sequential Monte Carlo Methods (for DSGE Models)

Point, Interval, and Density Forecast Evaluation of Linear versus Nonlinear DSGE Models

Sequential Monte Carlo samplers for Bayesian DSGE models

BAYESIAN METHODS FOR VARIABLE SELECTION WITH APPLICATIONS TO HIGH-DIMENSIONAL DATA

Advanced Statistical Modelling

Lecture 8: Bayesian Estimation of Parameters in State Space Models

Model comparison. Christopher A. Sims Princeton University October 18, 2016

High-dimensional Problems in Finance and Economics. Thomas M. Mertens

Introduction to Smoothing spline ANOVA models (metamodelling)

(I AL BL 2 )z t = (I CL)ζ t, where

MODEL COMPARISON CHRISTOPHER A. SIMS PRINCETON UNIVERSITY

Markov Chain Monte Carlo methods

Combining Macroeconomic Models for Prediction

Dynamic Identification of DSGE Models

Bayesian Inference and MCMC

Part 1: Expectation Propagation

Introduction to Bayesian Methods

Bayesian Phylogenetics:

DSGE Model Forecasting

Bayesian Regression Linear and Logistic Regression

Bayesian RL Seminar. Chris Mansley September 9, 2008

F denotes cumulative density. denotes probability density function; (.)

Computer Practical: Metropolis-Hastings-based MCMC

Lecture 4: Dynamic models

Estimation of moment-based models with latent variables

CPSC 540: Machine Learning

MCMC for big data. Geir Storvik. BigInsight lunch - May Geir Storvik MCMC for big data BigInsight lunch - May / 17

Estimating Macroeconomic Models: A Likelihood Approach

Bayesian Learning. HT2015: SC4 Statistical Data Mining and Machine Learning. Maximum Likelihood Principle. The Bayesian Learning Framework

Markov Chain Monte Carlo (MCMC) and Model Evaluation. August 15, 2017

Stochastic simulations with DYNARE. A practical guide.

Likelihood-free MCMC

Dynamic Factor Models and Factor Augmented Vector Autoregressions. Lawrence J. Christiano

Probabilistic Machine Learning

Bayesian Estimation of DSGE Models 1 Chapter 3: A Crash Course in Bayesian Inference

MONFISPOL FP7 project SSH Report on computing optimal policy

Monetary and Exchange Rate Policy Under Remittance Fluctuations. Technical Appendix and Additional Results

David Giles Bayesian Econometrics

Eco517 Fall 2013 C. Sims MCMC. October 8, 2013

Bayesian Calibration of Simulators with Structured Discretization Uncertainty

Computational statistics

Bayesian Methods for DSGE models Lecture 1 Macro models as data generating processes

Sequential Monte Carlo and Particle Filtering. Frank Wood Gatsby, November 2007

Introduction to Systems Analysis and Decision Making Prepared by: Jakub Tomczak

1 Bayesian Linear Regression (BLR)

Bayesian Inference in Astronomy & Astrophysics A Short Course

Estimating a Nonlinear New Keynesian Model with the Zero Lower Bound for Japan

Notes on pseudo-marginal methods, variational Bayes and ABC

Answers and expectations

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω

CS281A/Stat241A Lecture 22

Why do we care? Examples. Bayes Rule. What room am I in? Handling uncertainty over time: predicting, estimating, recognizing, learning

Bayesian Model Comparison:

Session 5B: A worked example EGARCH model

The Basic RBC model with Dynare

Eco517 Fall 2014 C. Sims MIDTERM EXAM

Session 2B: Some basic simulation methods

Statistics & Data Sciences: First Year Prelim Exam May 2018

State-Space Methods for Inferring Spike Trains from Calcium Imaging

STA 4273H: Sta-s-cal Machine Learning

The 2001 recession displayed unique characteristics in comparison to other

Solving Deterministic Models

Introduction into Bayesian statistics

SUPPLEMENT TO MARKET ENTRY COSTS, PRODUCER HETEROGENEITY, AND EXPORT DYNAMICS (Econometrica, Vol. 75, No. 3, May 2007, )

Graphical Models for Collaborative Filtering

Hierarchical models. Dr. Jarad Niemi. August 31, Iowa State University. Jarad Niemi (Iowa State) Hierarchical models August 31, / 31

First order approximation of stochastic models

Statistical Inference and Methods

Decision theory. 1 We may also consider randomized decision rules, where δ maps observed data D to a probability distribution over

Bayesian Machine Learning

Parameter estimation and forecasting. Cristiano Porciani AIfA, Uni-Bonn

Bayesian Analysis (Optional)

Learning the hyper-parameters. Luca Martino

Bayesian search for other Earths

Stat 535 C - Statistical Computing & Monte Carlo Methods. Lecture February Arnaud Doucet

The full RBC model. Empirical evaluation

ComputationalToolsforComparing AsymmetricGARCHModelsviaBayes Factors. RicardoS.Ehlers

Estimation of reliability parameters from Experimental data (Parte 2) Prof. Enrico Zio

Transcription:

ESTIMATION of a DSGE MODEL Paris, October 17 2005 STÉPHANE ADJEMIAN stephane.adjemian@ens.fr UNIVERSITÉ DU MAINE & CEPREMAP Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 1/3

Bayesian approach A bridge between calibration and maximum likelihood. Uncertainty and a priori knowledge about the model and its parameters are described by prior probabilities. Confrontation to the data, through the likelihood function, leads to a revision of these probabilities ( posterior probabilities). Testing and model comparison is done by comparing posterior probabilities (over models). Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 2/3

Prior density The prior density describes a priori beliefs, before observing the data: p(θ A A) A stands for a specific model. θ A represents the parameters of model A. p( ) normal, gamma, shifted gamma, inverse gamma, beta, generalized beta, uniform... Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 3/3

Likelihood function The likelihood describes the density of the observed data, given the model and its parameters: L(θ A Y T, A) p(y T θ A, A) Y T are the observations until period T. In our case, the likelihood is recursive: p(y T θ A, A) = p(y 0 θ A, A) T t=1 p(y t Y t 1,θ A, A) Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 4/3

Bayes theorem We have a prior density p(θ) and the likelihood p(y T θ). We are interested in p(θ Y T ), the posterior density. Using the Bayes theorem twice we obtain the density of the parameters knowing the data: We have: and also p(θ Y T ) = p(θ;y T) p(y T ) p(y T θ) = p(θ;y T) p(θ) p(θ;y T ) = p(y T θ) p(θ) Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 5/3

Posterior kernel and density By substitution, we get the posterior density: p(θ A Y T, A) = p(y T θ A, A)p(θ A A) p(y T A) Where p(y T A) is the marginal density of the data conditional on the model: p(y T A) = p(θ A ;Y T A)dθ A Θ A The posterior kernel (un-normalized posterior density): p(θ A Y T, A) p(y T θ A, A)p(θ A A) K(θ A Y T, A) Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 6/3

A simple example (I) Data Generating Process y t = µ + ε t, with t = 1,...,T where ε t N(0, 1) is a gaussian white noise. The likelihood is given by p(y T µ) = (2π) T 2 e 1 2 P T t=1 (y t µ) 2 µ ML,T = 1 T T t=1 y t y Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 7/3

A simple example (II) Note that the variance of this estimator is a simple function of the sample size V[ µ ML,T ] = 1 T Let our prior be a gaussian distribution with expectation µ 0 and variance σ 2 µ. The posterior density is defined, up to a constant, by: p (µ Y T ) (2πσ 2 µ) 1 2 e 1 2 (µ µ 0 ) 2 σ 2 µ (2π) T 2 e 1 2 P T t=1 (y t µ) 2 Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 8/3

A simple example (III)... Or equivalently 2 p (µ Y T ) e (µ E[µ]) V[µ] the posterior distribution is gaussian, with: V[µ] = 1 ( 1T ) 1 + σ 2 µ and E[µ] = ( 1T ) 1 µml,t + σ 2 µ µ 0 ( 1T ) 1 + σ 2 µ Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 9/3

A simple example (The bridge, IV) E[µ] = ( 1T ) 1 µml,t + σ 2 µ µ 0 ( 1T ) 1 + σ 2 µ The posterior mean is a convex combination of the prior mean and the ML estimate. If σ 2 µ (no prior information) then E[µ] µ ML,T. If σ 2 µ 0 (calibration) then E[µ] µ 0. Not so simple if the model is non linear in the estimated parameters... In general we have to follow a simulation based approach to get the posterior distributions and moments. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 10/3

Model comparison (I) Suppose we have two models A and B (with two associated vectors of deep parameters θ A and θ B ) estimated using the same sample Y T. For each model I = A, B we can evaluate, at least theoretically, the marginal density of the data conditional on the model: p(y T I) = p(θ I I) p(y T θ I, I)dθ I Θ I by integrating out the deep parameters θ I from the posterior kernel. p(y T I) measures the fit of model I. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 11/3

model A model B p(y T A) p(y T B) Y T Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 12/3

Model comparison (II) Suppose we have a prior distribution over models: p(a) and p(b). Again, using the Bayes theorem we can compute the posterior distribution over models: p(i Y T ) = p(i)p(y T I) I=A,B p(i)p(y T I) This formula may easily be generalized to a collection of N models. Posterior odds ratio: p(a Y T ) p(b Y T ) = p(a) p(b) p(y T A) p(y T B) Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 13/3

In practice... We may be interested in: Estimating some posterior moments. Estimating the posterior marginal density to compare models. We can do it by hand for linear models (for instance VAR models) by carefully choosing the priors...... But it s impossible for DSGE models. We use a simulation based approach. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 14/3

Metropolis algorithm (I) 1. Choose a starting point θ & run a loop over 2-3-4. 2. Draw a proposal θ from a jumping distribution J(θ θ t 1 ) = N(θ t 1,cΣ m ) 3. Compute the acceptance ratio r = p(θ Y T ) p(θ t 1 Y T ) = K(θ Y T ) K(θ t 1 Y T ) 4. Finally θ t = { θ with probability min(r, 1) θ t 1 otherwise. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 15/3

posterior kernel K(θ o ) θ o Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 16/3

K ( θ 1) = K(θ ) posterior kernel K(θ o ) θ o θ 1 = θ Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 17/3

K ( θ 1) posterior kernel K(θ o ) K(θ )?? θ o θ 1 θ Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 18/3

Metropolis algorithm (II) How should we choose the scale factor c (variance of the jumping distribution)? The acceptance ratio should be strictly positive and not too important. How many draws? Convergence has to be assessed... Parallel Markov chains Pooled moments have to be close to Within moments. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 19/3

Approximation of the marginal density By definition we have: p(y T A) = p(θ A Y T, A)p(θ A A)dθ A Θ A By assuming that the posterior density is gaussian (Laplace approximation) we have the following estimator: p(y T A) = (2π) k 2 Σθ m A 1 2 p(θ m A Y T, A)p(θ m A A) where θ m A is the posterior mode. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 20/3

Harmonic mean (I) Note that " # f(θ A ) E A p(θ A A)p(Y T θ A, A) θa, = Z f(θ A )p(θ A Y T, A) Θ A p(θ A A)p(Y T θ A, A) dθ A where f is a density function. The right member of the equality, using the definition of the posterior density, may be rewritten as Z f(θ A ) Θ A p(θ A A)p(Y T θ A, A) p(θ A A)p(Y T θ A, A) RΘ A p(θ A A)p(Y T θ A, A)dθ A dθ A Finally, we have " # f(θ A ) E A p(θ A A)p(Y T θ A, A) θa, = R Θ f(θ)dθ R A Θ p(θ A A A)p(Y T θ A, A)dθ A Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 21/3

Harmonic mean (II) So that p(y T A) = E [ f(θ A ) ] 1 θ A, A p(θ A A)p(Y T θ A, A) This suggests the following estimator of the marginal density p(y T A) = [ 1 B B b=1 f(θ (b) A ) p(θ (b) A A)p(Y T θ (b) A, A) Each drawn vector θ (b) A comes from the Metropolis-Hastings monte-carlo. ] 1 Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 22/3

Harmonic mean (III) The preceding proof holds if we replace f(θ) by 1 Simple Harmonic Mean estimator. But this estimator may also have a huge variance. The density f(θ) may be interpreted as a weighting function, we want to give less importance to extremal values of θ. Geweke (1999) suggests to use a truncated gaussian function (modified harmonic mean estimator). Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 23/3

DSGE model (I) Any DSGE model may be represented as follows with: E t [ǫ t+1 ] = 0 E t [ ǫt+1 ǫ t+1] = Σǫ E t [f θ (y t+1,y t,y t 1,ǫ t )] = 0 where: y is the vector of endogenous variables, ǫ is the vector of exogenous stochastic shocks, θ is the vector of deep parameters. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 24/3

DSGE model (II, solution) We linearize the model around a deterministic steady state ȳ(θ) (such that f θ (ȳ,ȳ,ȳ, 0) = 0). Solving the linearized version of this model (with dynare for instance), we get a state space reduced form representation: y t ŷ t = Mȳ(θ) + Mŷ t +η t = g y (θ)ŷ t 1 + g u (θ)ǫ t E [ ǫ t ǫ t] = Σǫ E [ η t η t] = V The reduced form is non linear in the deep parameters... Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 25/3

DSGE model (III, Kalman filter)... But linear in the endogenous and exogenous variables. So that the likelihood may be evaluated with a linear prediction error algorithm. Kalman Filter recursion, for t = 1,...,T : v t F t K t ŷ t+1 = y t ȳ (θ) Mŷ t = MP t M + V = g y (θ)p t M Ft 1 = g y (θ)ŷ t + K t v t P t+1 = g y (θ)p t (g y (θ) K t M) + g u (θ)σ ǫ g u (θ) with initial conditions y 1 and P 1. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 26/3

DSGE model (IV, likelihood & posterior) We have to estimate θ, Σ ǫ and V The log-likelihood is defined by : log L(θ Y T ) = Tk 2 log 2π 1 2 T t=1 log F t 1 2 T t=1 v tf t 1 v t where the vector θ contains the k parameters to be estimated (θ, vech(σ ǫ ) and vech(v )). The log posterior kernel is then defined by : log K(θ YT ) = log L(θ Y T ) + log p(θ) Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 27/3

Rabanal & Rubio-Ramirez 2001 (I) New keynesian models. Common equations : y t = E t y t+1 σ(r t E t p t+1 + E t g t+1 g t ) y t = a t + (1 δ)n t mc t = w t p t + n t y t mrs t = 1 σ y t + γn t g t r t = ρ r r t 1 + (1 ρ r ) [γ π p t + γ y y t ] + z t w t p t = w t 1 p t 1 + w t p t a t,g t AR(1), z t,λ t are gaussian white noises. Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 28/3

Rabanal & Rubio-Ramirez 2001 (II) Baseline sticky prices model (BSP) : p t = βe [ p t+1 + κ p (mc t + λ t )] w t p t = mrs t Sticky prices & Price indexation (INDP) : p t = γ b p t 1 + γ f E [ p t+1 + κ p(mc t + λ t ) ] w t p t = mrs t Sticky prices & wages (EHL) : p t = βe t [ p t+1 + κ p (mc t + λ t )] w t = βe t [ w t+1 ] + κ w [mrs t (w t p t )] Sticky prices & wages + Wage indexation (INDW) : w t α p t 1 = βe t [ w t+1 ] αβ p t + κ w [mrs t (w t p t )] Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 29/3

DYNARE (I) var a g mc mrs n pie r rw winf y; varexo e_a e_g e_lam e_ms; parameters invsig delta... ; model(linear); y=y(+1)-(1/invsig)*(r-pie(+1)+g(+1)-g); y=a+(1-delta)*n; mc=rw+n-y;... end; Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 30/3

DYNARE (II) estimated_params; stderr e_a, uniform_pdf,,,0,1; stderr e_lam, uniform_pdf,,,0,1;... rho,uniform_pdf,,,0,1; gampie, normal_pdf, 1.5, 0.25;... end; varobs pie r y rw; estimation(datafile=dataraba,first_obs=10,...,mh_jscale=0.5); Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 31/3

Posterior mode Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 32/3

Posterior mode 0.3 omega (Interval) 12 x 10 3 omega (m2) 2.5 x 10 3 omega (m3) 0.28 0.26 0.24 10 8 2 1.5 1 0.22 2 4 6 6 2 4 6 0.5 2 4 6 0.08 rhoa (Interval) x 10 4 10 x 10 4 rhoa (m2) x 10 4 5 x 10 5 rhoa (m3) x 10 4 0.07 0.06 8 6 4 3 2 0.05 2 4 6 4 2 4 6 1 2 4 6 0.14 rhog (Interval) x 10 4 2.5 x 10 3 rhog (m2) x 10 4 2 x 10 4 rhog (m3) x 10 4 0.12 2 1.5 0.1 1.5 1 0.08 2 4 6 1 2 4 6 0.5 2 4 6 x 10 4 x 10 4 x 10 4 Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 33/3

Posterior distributions (I) Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 34/3

Posterior distributions (II) SE_e_a SE_e_g SE_e_ms 300 30 200 100 20 10 2000 1000 0 0 0.5 1 0 0 0.5 1 0 0 0.5 1 SE_e_lam invsig gam 2 1.5 1 0.5 0.3 0.2 0.1 1.5 1 0.5 0 0 0.5 1 0 0 10 20 30 0 0 1 2 rho gampie gamy 10 2 6 4 5 1 2 0 0 0.5 1 0 1 1.5 2 2.5 0 0.2 0 0.2 0.4 Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 35/3

Posterior distributions (III) omega rhoa 4 15 3 10 2 1 5 0 0 0.5 1 0 0 0.2 0.4 0.6 0.8 1 10 rhog 0.4 thetabig 8 0.3 6 4 0.2 2 0.1 0 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 12 14 Slides.tex ESTIMATION of a DSGE MODEL STÉPHANE ADJEMIAN 16/10/2005 21:37 p. 36/3