Forecasting Calibrated Model

HI,

I want to forecast calibrated model, when some variables are unobservable. So it is needed to run a smoother and then forecast.
In the mod file with no estimated estimated_params block I wrote:

varobs x xx;
estimation(datafile=xxx,mode_compute=0, smoother, forecast=zz);

But I’ve got an error. There is an error also when I remove forecast. The mod file works correctly with removed varobs and estimation blocks. I do not know where the problem is. Please, help me with the problem, this is urgent.
Thank you!

Please give more details, ideally by posting your MOD file and data.

But is it possible to forecast smoothed variables with calibrated parameters? With calib_smoother, I know you can forecast filtered variables. But can you forecast smooth variables (with no estimated estimated_params block)?

I tried it, no error, but also no oo_.forecast

estimation(datafile=pickupdata0, mode_compute=0, smoother, forecast=7, first_obs=1) inf_obs y i pi;

What do you mean with

?
Smoothed variables are in-sample, so there is no true forecast.

Oh yeah, I see it…because we use all the data. Thanks! I thought though that the original question was trying to forecast smoothed variables using a calibrated model…but I see why that reasoning is wrong.

Actually, I wanted to do the following…

  1. Given data y = {y_1,y_2,y_3...y_{20}...y_T}
  2. Estimate the model parameters with y
  3. Then forecast say \hat{y_{21}}, \hat{y_{22}}, \hat{y_{23}},\hat{y_{24}},\hat{y_{25}} (5 steps ahead sequentially).
  4. And compare forecast in point 3 above with data {y_{21}}, {y_{22}}, {y_{23}},{y_{24}},{y_{25}}.

I have been able to do that using filtered variables and forecast of filtered variables via calib_smoother

My problem: Filtered variables although have the same dynamics as original variables, the scale is different after running my mod file in dynare. Scale, I mean the y-axis of filtered variables is about 3 to 4 times larger than that in the original data.

My earlier thought: Given that smoothed variables tend to be closer to the original, I wanted to consider it as original (i.e., approximately), and if it were forecastable (i.e., true in-sample forecast), I will take that to approximate \hat{y_{21}}, \hat{y_{22}}, \hat{y_{23}},\hat{y_{24}},\hat{y_{25}} above. But I get why it is not a true in-sample forecast and we can’t do a 5-step ahead forecast (of smoothed variables) from say period 20.

It seems in-sample forecast can only be done with filtered variables and not original variables, right?

Your “problem” suggests there must be something wrong. If the variables at hand are observable, there one-step ahead prediction cannot be

To make that happen, the model must be extremely misspecified. I also don’t understand what you mean with

For observed variables, the smoothed variables must be identical to the observations.

  1. Yeah. ‘Closer’, I mean smoothed variables are identical to observed variables.
  1. Oh ok, so if I understand, for a somewhat correctly specified model, the deviation between filtered variables and observed variables should be approximately zero (very small).

The filtered variables are still x-period ahead forecasts. So the deviations from observations should be roughly mean zero, but not on a period by period basis.

I guess this statement is correct:

In-sample forecast can only be done using filtered variables and not observations or smoothed variables in dynare, yeah?. And here, I cannot consider filtered variables approximately as observations since the two can deviate on a period-by-period basis.

By construction, only the filtered variables are true forecasts for the observables. As I said, the fact that the filtered values are so different from the realizations suggests there is something seriously wrong.

1 Like