Page 1 of 1

first_obs (estimation)

PostPosted: Thu Jun 25, 2015 9:54 am
by Sharky
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   ;

Re: first_obs (estimation)

PostPosted: Wed Jul 01, 2015 5:43 am
by jpfeifer
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

Re: first_obs (estimation)

PostPosted: Mon Jul 06, 2015 4:40 pm
by Sharky
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?

Re: first_obs (estimation)

PostPosted: Tue Jul 07, 2015 9:59 am
by jpfeifer
What do you mean with moving further apart? Also, are you sure you are comparing the correct time points for the respective forecasts?

Re: first_obs (estimation)

PostPosted: Fri Jul 10, 2015 2:37 pm
by Sharky
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

Re: first_obs (estimation)

PostPosted: Sat Jul 11, 2015 8:00 am
by jpfeifer
This rather seems like they are shifted by one period and one is demeaned while the other one is not.