historical and smoothed variables

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.

historical and smoothed variables

Postby timothy.hills » Fri Apr 26, 2013 6:09 am

I cannot find in the User Guide where it explains within context of the Bayesian estimation methods how to interpret the graph of Historical and Smoothed Variables. This should definitely be included in the User's Guide (or I might simply not be looking hard enough).

Thanks

Timothy
timothy.hills
 
Posts: 2
Joined: Tue Feb 19, 2013 4:46 pm

Re: historical and smoothed variables

Postby jpfeifer » Thu Aug 22, 2013 7:56 am

From a soon to be published documentation:
Historical and smoothed variables:
Historical and smoothed variables plot generated by the estimation-command when either maximum likelihood estimation (ML) is used or Bayesian estimation without the smoother-option. It is stored in the main folder. The dotted black line depicts the actually observed data, while the red line depicts the estimate of the smoothed variable (“best guess for the observed variable given all observations”), derived from the Kalman smoother at the posterior mode (ML) or posterior mean (Bayesian estimation). In case of no measurement error, both series are identical.
------------
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: historical and smoothed variables

Postby draoul » Mon May 25, 2015 1:04 pm

Hi everyone

I have a following up question to this post:

Does this mean that in the presence of measurement errors, the historical and smoothed variables ought not to be the same?

I am asking because of the following problem: Currently, I am working on a limited heterogeneity model. I estimate the model. To avoid the problem of stochastic singularity I include a measurement error on the gini coefficient on consumption. Estimation seems to work properly (Convergence diagnostics, identification etc. looks ok). However, besides the measurement error (e1), the historical and smoothed gini coefficient seem to be identical (see figure 1 in the attachment). On top of that, the measurement error is far away from being white noise (see figure 2). Does this imply that my model is just incapable of generating the dynamics in the gini coefficient or what could be the problem here?

I am using here interpolated annual data for the gini coefficient. I thought that this might be the problem, therefore I constructed a quarterly measure. In this case, the historical and smoothed series still seem to be identical (see figure 3). The smoothed measurement error seems to be closer to white noise. However, it seems just to mirror the dynamics of the gini coefficient (one can clearly see this by comparing figure 3 and 4). Any ideas what the problem could be?

Thanks a lot for your help!

Best,

Raoul
Attachments
figure4.pdf
(9.56 KiB) Downloaded 557 times
figure3.pdf
(9.37 KiB) Downloaded 389 times
figure2.pdf
(9.24 KiB) Downloaded 433 times
figure1.pdf
(8.98 KiB) Downloaded 440 times
draoul
 
Posts: 10
Joined: Wed May 13, 2015 12:24 pm

Re: historical and smoothed variables

Postby jpfeifer » Tue May 26, 2015 5:27 pm

In general, the difference between the smoothed and the historical series is the measurement error. Thus, if measurement error is important, the two will deviate. What is strange is that the scale of the measurement error and the gini do not at all match. How exactly do you enter the measurement error? And which Dynare version are you using.

With interpolated data, your measurement error will always look more persistent and there are very good reasons for not interpolating, see http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6759. Moreover, all models are misspecified in some dimensions. This will often show up in measurement error. It being non-white noise is to be expected. It is the degree of this that matters.
------------
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: historical and smoothed variables

Postby draoul » Thu May 28, 2015 11:46 am

Dear Johannes

Many thanks for your enlightening answers. I am using Dynare 4.4.3 together with Matlab R2015a. I have entered the measurement error as follows:

model;
...
gini_obs=gini-ginis+sige1*e1;
end;

and I have estimated the standard error by imputting

shocks;
...
var e1; stderr 1;
end;

estimated_params;
...
sige1, inv_gamma_pdf, 0.01, inf;
...
end;

I think the problem with the scale you mentioned was related to the way I imputted the standard error. If I imput it this way:
model;
...
gini_obs=gini-ginis+e1;
end;

estimated_params;
...
stderr e1, inv_gamma_pdf, 0.01, inf;
...
end;

the scale seems to be consistent. However, the smoothed series is still equal to the observed (see figure 1+2). Last but not least, I specified the measurement error like this:
model;
...
gini_obs=gini-ginis;
end;

estimated_params;
...
stderr gini_obs, inv_gamma_pdf, 0.01, inf;
...
end;

In this case the observable and the smoothed series deviate and the deviation seems to match the measurement error (see figure 3+4) as it should be.

Accordingly, the historical and smoothed variables plot seems to be only correctly produced when using the last approach (Note, the estimated parameters are identical in all three approaches of specifying the measurement error). Is this because with the first two approaches dynare doesn't know that this shock is a measurement error (i.e. a disturbance in the observation and not in the state equation of the state space representation)?

Best regards,

Raoul
Attachments
fig4.pdf
(10.26 KiB) Downloaded 396 times
fig3.pdf
(10.34 KiB) Downloaded 379 times
fig2.pdf
(9.39 KiB) Downloaded 450 times
fig1.pdf
(12.41 KiB) Downloaded 558 times
draoul
 
Posts: 10
Joined: Wed May 13, 2015 12:24 pm

Re: historical and smoothed variables

Postby jpfeifer » Fri May 29, 2015 2:35 pm

Exactly, in one case, Dynare takes the measurement error to really be just that: measurement error. It then plots the inferred/smoothed underlying variable without measurement error. If you specify the measurement error as a structural shock instead, Dynare does not know this and simply plots the data series.
------------
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 User Guide

Who is online

Users browsing this forum: No registered users and 1 guest