Approximation impact on theoretical moments

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Approximation impact on theoretical moments

Postby mricci » Thu Jun 18, 2015 3:51 pm

Hi all,
I am writing for the following question.

While using Dynare I have noticed that working with log-linearized equations (e.g the log-linearization is operated by hand by myself) rather than Non-linear exp() equations (e.g. the log-linearization is operated by Dynare) seems to have an impact on Theoretical moments as well as Policy Functions Coefficients.

In particular, it seems to me that differences in variables standard deviations may reach the 9-10% (even tough on average their magnitude is smaller, like 2-3%). I attach below a minimal model code which shows this point (RBC1 is log-linear, RBC is exp() Non-linear).

Now, my interpretation is that this is because Dynare performs the derivatives numerically and therefore delivers slightly different results due to the underlying approximation. Then my questions are:

1. Is my interpretation correct?

2. If that is the case, how can we discern differences due by errors in the log-linear model derivation (e.g errors in the log-linearizations by hand) from differences due by Dynare approximation? E.g Which is the magnitude of differences in thereotical std (or policy function coefficients) which one should naturally expect and what is instead a “too big” difference?

A remark: if you are wondering why I am interested, consider that while dealing with large scale DSGE models it may be useful to compare the outcomes of the two codes (Non-linear model vs log-linear) as an extra double check.

Thank you in advance,

Mattia
Attachments
RBC2.mod
(4.05 KiB) Downloaded 115 times
RBC1.mod
(2.94 KiB) Downloaded 119 times
mricci
 
Posts: 35
Joined: Sat Aug 16, 2014 3:31 pm

Re: Approximation impact on theoretical moments

Postby jpfeifer » Thu Jun 18, 2015 8:17 pm

No, your interpretation is not correct. Rather, your two mod-file are different, potentially because your linearization and its steady state computation is wrong. If you look at RBC1, there
nbar =0.25;

while in RBC2, the steady state of n is
Code: Select all
n=-1.382603082646228

which is 0.2509. As the steady states are not the same, the models are not the same and thus the results cannot be the same.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Approximation impact on theoretical moments

Postby mricci » Fri Jun 19, 2015 10:50 am

Dear Professor Pfeifer,
Thank you very much for your answer and sorry for those imprecisions present in the files.

May I ask at this point, and independently from the specific mistakes present in those .mod files, if I should or should not expect Theoretical moments and policy functions coefficients to be identical (say, equal up to the very last decimal) when comparing the results of a given model introduced in Dynare both in Log-lin and in exp() Nonlinear forms?

Thanks,
Mattia
mricci
 
Posts: 35
Joined: Sat Aug 16, 2014 3:31 pm

Re: Approximation impact on theoretical moments

Postby jpfeifer » Thu Jun 25, 2015 7:28 am

The decision rules and consequently the theoretical properties including the moments should be the same (apart from potential numerical inaccuracies of the order say 10^-6)
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 1 guest