first_obs (estimation)

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.

first_obs (estimation)

Postby Sharky » Thu Jun 25, 2015 9:54 am

Hi

A quick clarification. With the command "first_obs" in the estimation line, the manual says this is "The number of the first observation to be used". Does this mean that all previous observations are simply discarded? Or is it the first period in which filtered/smoothed/forecast variables are estimated, but all previous observations are available for training sample? And how does the latter relate to the presample command?

Code below (largely inherited), if that helps. Thanks in advance.

Code: Select all
estimation(optim=('MaxIter',200),datafile=usmodel_data_rec,mode_compute=4,first_obs=71,presample=4,lik_init=2,prefilter=0,mh_replic=0,mh_nblocks=2,mh_jscale=0.20,mh_drop=0.2,bayesian_irf,irf=0,forecast=1,nograph) labobs   robs   pinfobs   dy   dc   dinve   dw   ;
Sharky
 
Posts: 3
Joined: Thu Jun 25, 2015 9:45 am

Re: first_obs (estimation)

Postby jpfeifer » Wed Jul 01, 2015 5:43 am

Yes, all observations before this are discarded. The presample option then specifies the number of observations after firstobs that are used for training the Kalman filter
------------
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: first_obs (estimation)

Postby Sharky » Mon Jul 06, 2015 4:40 pm

jpfeifer wrote:Yes, all observations before this are discarded. The presample option then specifies the number of observations after firstobs that are used for training the Kalman filter

Thanks very much, jpfeifer.

A further - probably unrelated question. Using similar code to before but with filtered_vars added
Code: Select all
estimation(optim=('MaxIter',200),datafile=usmodel_data_recfull,nobs=[70:270],mode_compute=4,first_obs=1,presample=4,lik_init=2,prefilter=0,mh_replic=0,mh_nblocks=2,mh_jscale=0.20,mh_drop=0.2,bayesian_irf,irf=0,forecast=1,filtered_vars,nograph) labobs   robs   pinfobs   dy   dc   dinve    dw   ;

gives me two sets of forecasts for the observables, one filtered (parameters estimated over full sample 1:T but using only observables 1:t) and one recursive out of sample (parameters and data both using only subsample 1:t).

In principle then, as t=>T the two sets of forecasts ought to be the same, in particular the final observations when the two sets of estimated parameters and information sets are identical. However, this is not the case: if anything they are moving further apart. Can you explain how this can possibly be the case?
Sharky
 
Posts: 3
Joined: Thu Jun 25, 2015 9:45 am

Re: first_obs (estimation)

Postby jpfeifer » Tue Jul 07, 2015 9:59 am

What do you mean with moving further apart? Also, are you sure you are comparing the correct time points for the respective forecasts?
------------
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: first_obs (estimation)

Postby Sharky » Fri Jul 10, 2015 2:37 pm

jpfeifer wrote:What do you mean with moving further apart? Also, are you sure you are comparing the correct time points for the respective forecasts?

Here: they aren't really moving further apart, but the two series (blue recursive, red filtered) are not converging as the information sets converge.
Image
Sharky
 
Posts: 3
Joined: Thu Jun 25, 2015 9:45 am

Re: first_obs (estimation)

Postby jpfeifer » Sat Jul 11, 2015 8:00 am

This rather seems like they are shifted by one period and one is demeaned while the other one is not.
------------
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 help

Who is online

Users browsing this forum: Google [Bot] and 7 guests