Recursive Bayesian Estimation and Forecasting

Hi,

I am an undergraduate student, and I am estimating a NK model using recursive Bayesian technique. I have data starting from 1960Q1 to 2014Q4.
What I want to do is to estimate the model:
First, by using the data from 1960Q1 through 1975Q4 and produce forecasts 1 to 8 quarters ahead, that is, for 1976Q1 to 1977Q4.
Next, I estimate the model using data from 1960Q2 through 1976Q1 to update the estimates and then produce another set of forecasts for 1976Q2 to 1978Q1. Estimates and forecasts are updates in this manner until the end of the sample.

Can anyone please tell me how I can update the following estimation command to produce the results that I want?
estimation(datafile=‘newdata’,mode_compute=0,mode_file=NKmodel_mode,presample=4,kalman_algo=1,lik_init=2,prefilter=0,mh_replic=0,mh_nblocks=2,mh_jscale=0.40,mh_drop=0.2,bayesian_irf, irf=20, forecast=8)

Thank you for your time.

Best Regards
Martin

You can do recursive estimation by specifying a range for nobs. See the manual on oo_.RecursiveForecast and tests/recursive · master · Dynare / dynare · GitLab

1 Like

Dear Johannes,

Thank you for your reply. I have N= 220 (from 1960Q1 to 2014Q4) and if I keep the window of 64 (1960Q1 through 1975Q4) quarters fixed, can I estimate as follows?

estimation(…, nobs=64, first_obs=[1:155],…, forecast=8)…;

Would this move the first and the last observation of the data by one period, i.e., 1960Q2 through 1976Q1? Also, if I estimate like this, I will have 155 different forecasts. Is there a way to get a combine them?

Kindly clarify because this is not very clear to me from dynare manual.

Kind Regards
M