Question about examples in the User Guide

Hi,

I download the codes for the examples in the User Guide.
(dynare.org/documentation-and … s.zip/view)
When I ran fs2000ns.mod, I got the following error:
-------------------------error starts-------------------------------------
??? Undefined function or variable “F”.

Error in ==> DiffuseKalmanSmoother1_Z at 136
Pstar(:,:,t+1) =
T*Pstar(:,:,t)T’-TPstar(:,:,t)*Z’*Kinf(:,:,t)’-Kinf(:,:,t)FKstar(:,:,t)’
+ QQ;

Error in ==> DsgeSmoother at 282
[alphahat,etahat,ahat,P,aK,PK,d,decomp] =
DiffuseKalmanSmoother1_Z(ST, …

Error in ==> dynare_estimation_1 at 1094
[atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,T,R,P,PK,decomp]
=
DsgeSmoother(xparam1,gend,data,data_index,missing_value);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> fs2000ns at 175
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;
---------------------error ends---------------------------------------------------------------------

How to fix it? Thanks.
fs2000ns.zip (4.11 KB)

This is a bug in Dynare which was fixed in one of the latest releases. Please upgrade to 4.1.3.

Best,

seems like I am using dynare whose version is 4.1.3. My matlab is 2008b and 2010b.

[quote=“SébastienVillemot”]This is a bug in Dynare which was fixed in one of the latest releases. Please upgrade to 4.1.3.

Best,[/quote]

Sorry you’re right, the bug is fixed in unstable but not in Dynare 4.1.3.

Until a new stable version is released, please use the attached version of the file “DiffuseKalmanSmoother1_Z.m” that you should put in the “matlab” subdirectory of your Dynare installation.
DiffuseKalmanSmoother1_Z.m (7.99 KB)

Dear Stephan
I use matlab7.10.0,Dynare 2011-06-01 version,but the fs2000ns code don’t work. The wrong is as fowllow:
Error in computing likelihood for initial parameter values
??? Error using ==> print_info at 39
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in ==> initial_estimation_checks at 101
print_info(info, options_.noprint)

Error in ==> dynare_estimation_1 at 122
initial_estimation_checks(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> fs2000ns at 176
dynare_estimation(var_list_);

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

Dear Stephan,

I also found the same error as Lee found (Jun 03, 2011 5:34pm) when run fs2000ns code. Would it be possible to explain why this happened, please?
Many thanks.
Wira

Hi, set lik_init=2 in the estimation command.

Thank you very much for your replying.But I add the option ‘diffuse_filter’, the code also work.Is there difference between the option diffuse_filter and lik_init? which is better to the unstable model?
Many thanks in advance!

Actually the “diffuse_filter” option was missing in this example from the User Guide. This will be fixed in the next draft of the guide.

Thanks