Problem with theoretical moments in Dynare 4.1.2

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Problem with theoretical moments in Dynare 4.1.2

Postby sebastian_econ » Fri Sep 10, 2010 11:39 am

Hello,
I face the following problem when using Dynare 4.1.2 to solve a stochastic linearized model and want to print out the theoretical moments:

In the attached mod-file US_OW98_original, the standard deviations of the innovations are expressed in percent/100. For the purpose of model comparison, an additional set of endogenous variables (labeled interest, inflation, inflationq,...) is defined as 100x the original corresponding model variable, respectively. Running this file, the theoretical moments of interest, inflation, inflationq are declared as NaNs, even so the theoretical moments for the original model variables representing the interest rate and so on are printed out.

Now, using the same file but multiplying the variances of the innovations in the shocks section by 10000 and deleting the 100x in the definition of the additional variables, I receive the theoretical moments of these variables (interest, inflation, inflationq). I have attached this case in the mod-file US_OW98.

Can you help me why the first procedure is not working? (I have to deal with more elaborated models in which the second procedure would be difficult to implement.).

Thanks & kind regards,
Sebastian
Attachments
US_OW98.mod
(6.06 KiB) Downloaded 112 times
US_OW98_original.mod
(5.94 KiB) Downloaded 122 times
sebastian_econ
 
Posts: 3
Joined: Fri Aug 20, 2010 7:52 am

Re: Problem with theoretical moments in Dynare 4.1.2

Postby maurice » Sat Sep 11, 2010 2:23 pm

maybe your Dynare 4.1.2 is installed wrong.
I run your code,it works very well,and both can caculates the moments!
maurice
 
Posts: 13
Joined: Fri Jul 02, 2010 12:19 am

Re: Problem with theoretical moments in Dynare 4.1.2

Postby sebastian_econ » Mon Sep 13, 2010 8:49 am

Dear Maurice,
thanks for your reply. Various colleagues have tried the US_OW98_original file and all face the same problem. Do I understand correctly that you indeed receive also the moments for the variables interest, inflation and inflationq when running US_OW98_original in Dynare 4? (For the other variables we receive the theoretical moments.)? If so, may I ask you which Matlab version you have used?
sebastian_econ
 
Posts: 3
Joined: Fri Aug 20, 2010 7:52 am

Re: Problem with theoretical moments in Dynare 4.1.2

Postby SébastienVillemot » Mon Sep 13, 2010 1:28 pm

Hi,

First, variables whose mean/variance appear as NaN are variables that are detected as having a unit root. Indeed, your model has a unit root, as shown in the list of eigenvalues.

Second, in the first version of the MOD file, Dynare detects “rff” as being stationnary, while “interest” is detected as being non-stationary, while the two only differ by a 100 factor. My understanding is that the discrepancy comes from the numerical tolerance of the algorithm used to discriminate between stationary and non-stationary variable (implemented in th_autocovariances.m). If you lower the threshold, then it works fine. Concretely, if you add:
Code: Select all
options_.Schur_vec_tol = 1e-6;

in your first MOD file, then it behaves like the second one.

I think this fixes your problem but be careful, you may have other problems of the same kind since you are playing with variables having a very small variance. The second procedure is better in this respect.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Problem with theoretical moments in Dynare 4.1.2

Postby sebastian_econ » Mon Sep 13, 2010 1:56 pm

Hi,
Indeed, since the model defines for instance explicitly the price level, which is not stationary under a wide range of monetary policy prescriptions I expected not all variables to be stationary. The question arised because of the results for the original inflation, interest variables on the one hand and those for the rescaled variables on the other hand.
Thanks a lot for the explanation for this discrepancy and how to circumvent it. Whenever possible I'll try to use the 2nd option as recommended!

Sebastian
sebastian_econ
 
Posts: 3
Joined: Fri Aug 20, 2010 7:52 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests