# Question about examples in the User Guide

**URL:** https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800
**Category:** Dynare help (legacy posts)
**Created:** [15 January 2011 03:18 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800 "2011-01-15T03:18:09Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![learnbydoing](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/5daacb/32.png) [@learnbydoing](https://forum.dynare.org/u/learnbydoing)
#### Post date: [15 January 2011 03:18 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/1 "2011-01-15T03:18:09Z")

</div>

Hi,

I download the codes for the examples in the User Guide.  
([dynare.org/documentation-and … s.zip/view](http://www.dynare.org/documentation-and-support/user-guide/models.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’-T_Pstar(:,:,t)\*Z’\*Kinf(:,:,t)’-Kinf(:,:,t)_F_Kstar(:,:,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](https://forum.dynare.org/uploads/default/original/1X/dcf634bb0ccf1e70c068c5f5f5163caae486ab09.zip) (4.11 KB)

---

<div class="post-metadata">

### Author: ![sebastien](https://forum.dynare.org/user_avatar/forum.dynare.org/sebastien/32/19973_2.png) [@sebastien](https://forum.dynare.org/u/sebastien)
#### Post date: [20 January 2011 19:11 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/2 "2011-01-20T19:11:02Z")

</div>

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

Best,

---

<div class="post-metadata">

### Author: ![learnbydoing](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/5daacb/32.png) [@learnbydoing](https://forum.dynare.org/u/learnbydoing)
#### Post date: [20 January 2011 19:53 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/3 "2011-01-20T19:53:26Z")

</div>

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]

---

<div class="post-metadata">

### Author: ![sebastien](https://forum.dynare.org/user_avatar/forum.dynare.org/sebastien/32/19973_2.png) [@sebastien](https://forum.dynare.org/u/sebastien)
#### Post date: [21 January 2011 15:12 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/4 "2011-01-21T15:12:47Z")

</div>

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](https://forum.dynare.org/uploads/default/original/1X/5c03a2c2bf3ecb52f694209753360d754de4f037.m) (7.99 KB)

---

<div class="post-metadata">

### Author: ![lee](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://forum.dynare.org/u/lee)
#### Post date: [3 June 2011 17:34 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/5 "2011-06-03T17:34:40Z")

</div>

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) ;

---

<div class="post-metadata">

### Author: ![igpwira](https://forum.dynare.org/letter_avatar_proxy/v4/letter/i/df788c/32.png) [@igpwira](https://forum.dynare.org/u/igpwira)
#### Post date: [5 June 2011 23:40 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/6 "2011-06-05T23:40:38Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [6 June 2011 09:37 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/7 "2011-06-06T09:37:29Z")

</div>

Hi, set lik\_init=2 in the estimation command.

---

<div class="post-metadata">

### Author: ![lee](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://forum.dynare.org/u/lee)
#### Post date: [6 June 2011 17:55 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/8 "2011-06-06T17:55:03Z")

</div>

> [@jpfeifer](#):
>
> 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!

---

<div class="post-metadata">

### Author: ![sebastien](https://forum.dynare.org/user_avatar/forum.dynare.org/sebastien/32/19973_2.png) [@sebastien](https://forum.dynare.org/u/sebastien)
#### Post date: [23 August 2011 15:18 UTC](https://forum.dynare.org/t/question-about-examples-in-the-user-guide/1800/9 "2011-08-23T15:18:58Z")

</div>

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
