Error Message when computing moments of endogenous variables

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.

Error Message when computing moments of endogenous variables

Postby bigbigben » Mon Apr 06, 2009 1:09 am

When I simulate a model with stoch_simul, an error message pops out:
??? Subscripted assignment dimension mismatch.

Error in ==> th_autocovariances at 131
Gamma_y{nar+2}(:,i) = abs(diag(aa*vx1*aa'+b2(:,i)*b2(:,i)'))./vv;

Error in ==> disp_th_moments at 38
[oo_.gamma_y,ivar] = th_autocovariances(dr,ivar,M_,options_);

Error in ==> stoch_simul at 69
disp_th_moments(oo_.dr,var_list);

Error in ==> rbc_invadj at 222
info = stoch_simul(var_list_);

Error in ==> dynare at 102
evalin('base',fname) ;

It seems that the matrix on the right hand side is empty. If I set options_.nomoments=1, then everything is fine. I am curious about why dynare can compute the IRFs but not the moments. What do I miss? My code is attached.
Attachments
rbc_invadj.mod
(3.9 KiB) Downloaded 64 times
bigbigben
 
Posts: 171
Joined: Sun May 28, 2006 1:19 am

Re: Error Message when computing moments of endogenous variables

Postby StephaneAdjemian » Mon Apr 06, 2009 9:04 am

Hi,

The problem is that your model has two unit roots. This is not a problem for the IRFs, but the second order moments of endogenous variables with stochastic trends are infinite. Dynare does not report the moments of non stationnary variables. In your case, all the endogenous variables listed after the stoch_simul command are non stationary. In this case Dynare crashes because he has nothing to report... We have to fix this. If you add a stationary variable in the list, Dynare will compute the moments of this variable.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.


Return to Dynare help

Who is online

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