Simulations in 4.2.0

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.

Simulations in 4.2.0

Postby quasar » Sat Mar 19, 2011 9:55 pm

Could you please help me with the following questions:
(I am using Dynare on Mac OS X 10.6.6 with Xcode 3.2.6 and Matlab 2010b)

1). Previously I used 4.1.3 and moments of simulated variables were different for different execution of dynare (completely expected).
I used simul_seed = ... to fix the result between executions. Now in v. 4.2.0 moments of simulated variables are THE SAME for DIFFERENT runs even though I never use simul_seed.
4.2.0
VARIABLE MEAN STD. DEV. VARIANCE SKEWNESS
c 2.763623 0.068328 0.004669 -0.209831 -1.253850
k 38.137501 1.216088 1.478869 -0.187244 -1.330142
z 0.003472 0.021882 0.000479 0.071209 -0.491385
(It would look to me that 4.2.0 uses by default simul_seed = default_value. But I checked reference manual for 4.2.0 and it says there is no default_value for simul_seed). Could you please explain how to make moments of simulated variables to be different in 4.2.0 for different runs of dynare (like in 4.1.3)?


2). Is there a simple way to invoke a specific version of Dynare (say 4.1.3 vs 4.2.0) while having both of them in the Matlab path?
(Currently if I want to do simulations with 4.1.3 I just need manually remove 4.2 from the path and run dynare with only 4.1.3 in the matlab path. But If later I want to run 4.2.0 I need again to add 4.2.0 into the path).

3). Is there any performance gain in simulation if I use ''model(use_dll)'' and use ''order = 2'' ? To me it seems when I use ''order = 2'', option ''use_dll'' is ignored. (Even though .c is created for both order 2 and 3. Order 3 seems to run faster. Does order=2 actually use .c ?)

4). Why (in 4.2.0) there is no output produced for policy functions, when I use ''use_dll'' and ''order =3'' ?

5). Does it really help to use model(use_dll) in estimation if it only uses 1st order?

6). When I use 4.1.3 it seems that dynare does not use mex. But when I use 4.2.0 it runs in mex mode. How can I force 4.1.3 to run in mex mode? (I added to matlab path both /matlab and /mex folders). I do have Xcode installed and matlab can see gcc (I was able to build 4.2.0 from Matlab using build_dynare.m)

Thank you!

BTW here is the simple .mod I am using
Attachments
SimpleGen.mod
(916 Bytes) Downloaded 87 times
quasar
 
Posts: 2
Joined: Fri Mar 18, 2011 7:00 pm

Re: Simulations in 4.2.0

Postby SébastienVillemot » Mon Mar 21, 2011 11:45 am

1) I think it is an error in the reference manual. I will look into this.

2) The easiest way to achieve this is to make sure that you did not save any of the Dynare paths in MATLAB path. Then you manually do an "addpath" on the MATLAB prompt before every run, choosing the version that you want.

3) Order 2 should work with USE_DLL. There should be a gain for medium-sized model in using USE_DLL. For big models, the compilation time is usually prohibitive.

4) Because 3rd order policy functions have too many terms and would create huge and unreadable output. The policy function is still accessible in oo_ (see the reference manual for details)

5) Yes, especially on medium-sized models.

6) Dynae 4.1.3 should use MEX. If it does not, it probably means you did not compile them. Also note that you should not directly add the "mex" subdirectory to MATLAB path; Dynare does this automatically.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

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