Problem with conditional_forecast

My .mod file contains the following:

[code]conditional_forecast_paths;
var x;
periods 1:1, 2:3, 4:4;
values 1.5, -0.5, 0.;
var r;
periods 1:4;
values -2.;
end;

conditional_forecast(parameter_set = posterior_mean, controlled_varexo = (d, m));

plot_conditional_forecast x r;[/code]

I’m getting the following error:

[code]??? Undefined variable or function iF might refer to the function if.

Error in ==> missing_DiffuseKalmanSmoother3 at 295
ri_d = Z’*iF(:,:,t)*v(:,t);

Error in ==> DsgeSmoother at 272
[alphahat,etahat,ahat,P,aK,PK,d,decomp] = missing_DiffuseKalmanSmoother3(T,R,Q,

Error in ==> imcforecast at 130
[atT,innov,measurement_error,filtered_state_vector,ys,trend_coeff] =
DsgeSmoother(xparam,gend,data,data_index,number_of_observations);

Error in ==> iccbe at 288
imcforecast(constrained_paths_, constrained_vars_, options_cond_fcst_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;[/code]

Am I invoking this command incorrectly? The estimation itself runs successfully.

Hi,

I think that function missing_DiffuseKalmanSmoother3 is broken. But I don’t understand why dynare goes there. Do you have NaNs in your dataset ?

Best,
Stéphane.

[quote=“doctorwes”]My .mod file contains the following:

[code]conditional_forecast_paths;
var x;
periods 1:1, 2:3, 4:4;
values 1.5, -0.5, 0.;
var r;
periods 1:4;
values -2.;
end;

conditional_forecast(parameter_set = posterior_mean, controlled_varexo = (d, m));

plot_conditional_forecast x r;[/code]

I’m getting the following error:

[code]??? Undefined variable or function iF might refer to the function if.

Error in ==> missing_DiffuseKalmanSmoother3 at 295
ri_d = Z’*iF(:,:,t)*v(:,t);

Error in ==> DsgeSmoother at 272
[alphahat,etahat,ahat,P,aK,PK,d,decomp] = missing_DiffuseKalmanSmoother3(T,R,Q,

Error in ==> imcforecast at 130
[atT,innov,measurement_error,filtered_state_vector,ys,trend_coeff] =
DsgeSmoother(xparam,gend,data,data_index,number_of_observations);

Error in ==> iccbe at 288
imcforecast(constrained_paths_, constrained_vars_, options_cond_fcst_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;[/code]

Am I invoking this command incorrectly? The estimation itself runs successfully.[/quote]