Simulation moments

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.

Simulation moments

Postby kyri82 » Thu Feb 10, 2011 6:18 pm

Hello everyone,
Why when I compute the moments of the simulated data myself do not exactly match those provided by Dynare? I mean, I can always produce the mean by the command:
mean(oo_.endo_simul(1,:))
but the result does not match the first moment of the first simuated endogenous variable.

Thanks!

Kyriacos
kyri82
 
Posts: 141
Joined: Thu Feb 10, 2011 6:14 pm
Location: Toulouse - France

Re: Simulation moments

Postby jpfeifer » Thu Feb 10, 2011 8:14 pm

That is not the correct way. Dynare drops by default 100 points at the beginning of the simulation (see manual) plus the number of points required to initialize the autoregressive state space representation. Hence, it should be:

Code: Select all
mean(oo_.endo_simul(1,options_.drop+M_.maximum_lag+1:end))
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Simulation moments

Postby kyri82 » Fri Feb 11, 2011 9:02 am

jpfeir,
thanks for your response! So just to make it clear to me: even though in the matrix oo_.endo_simul(:,:) I can find data for as many periods as I have asked for in the stoch_simul(periods = INTEGER), dynare computes moments by excluding the first 100+sthng data?
Thanks again!

Kyriacos
kyri82
 
Posts: 141
Joined: Thu Feb 10, 2011 6:14 pm
Location: Toulouse - France

Re: Simulation moments

Postby jpfeifer » Fri Feb 11, 2011 9:12 am

Yes, you are right. By setting options.drop=x you can change the number of points to be dropped. Note that this is also documented in the manual.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Simulation moments

Postby kyri82 » Fri Feb 11, 2011 10:31 am

Yes I know. I just thought that the data points are dropped all together. Thanks again!
Kyriacos
kyri82
 
Posts: 141
Joined: Thu Feb 10, 2011 6:14 pm
Location: Toulouse - France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests