Possible error with shock_decomposition in dynare 4.2.0

Hi, I may have found an error in the function evaluate_smoother.m, which is called by shock_decomposition.m. Lines 146-147 of evaluate_smoother.m are

[atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,T,R,P,PK,decomp] …
= DsgeSmoother(parameters,gend,data,data_index,number_of_observations);

I think the last argument is wrong and instead should be missing_value (0/1 dummy for whether data has missing observations) instead of number_of_observations. That is the code should be

[atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,T,R,P,PK,decomp] …
= DsgeSmoother(parameters,gend,data,data_index,missing_value);

dynare_estimation_1 calls DsgeSmoother several times as well and the last argument is missing_value. DsgeSmoother.m also looks like it expects missing_value as its last argument. Thanks a lot.

-Pat

Thanks for reporting this. It will be fixed in the next release.

Hi there,

I was looking for a post on missing observations and saw this one so maybe one of you can help me with two basic questions:

  1. How do I need to declare a missing observation in the data file? Is it an empty cell or some type of a character (such as “.” for example)?
  2. Do I need to change anything in the estimation command to alert the program that there are missing observations?

Thanks in advance!

El Chino Milton