Page 1 of 1

Same Model, Differen Results

PostPosted: Wed Jan 22, 2014 3:50 pm
by kipfilet
Hi everyone!

I am running some robustness checks on a model that I am solving using Dynare, but I am getting some relatively weird results.

My problem is the following: I have written the model in two different .mod files. In the first, I have a very parsimonious version of the model, where some variables (that I keep constant) are simply treated as parameters. In the second .mod file, I wrote the same model, but declaring some of the parameters as endogenous variables instead, following Ar(1)s with a well-defined autocorrelation and variance for the shock (both declared as exogenous parameters).

As a sanity check, I decided to see what I would get if I set the variance of those shocks to zero in the second model file. In principle, Dynare should give me the same results for both .mod files (since the only difference is that in the first, variables x and y are parameters, while in the second they are constant endogenous variables). All goes well if I use the stoch_simul command for a 2nd order approximation and do not specify "periods". The output that is printed (policy and transition functions, theoretical moments, etc.) is exactly the same.

However, I get an empty oo_.endo_simul series. To further check for errors, I decided to add the option "periods" to the stoch_simul function so as to generate series of endogenous variables and make sure that everything is consistent. This is where things start going wrong: the policy and transition functions are still the same, but this is no longer true for the rest of the output. In fact, some of the moments of simulated variables look *considerably* different for both models. I am trying to investigate what is the issue here. I have a suspicion, but would like to know if this sounds plausible: the second version of the model declares 10 exogenous shocks, while the first declares only 6 (in different orders). Is it possible that the order in which the shocks are declared matters so much? I would think it should not, especially if the model is stationary and the draw is long enough! This seems, however, to be the likely culprit, since the policy and transition functions (as well as the theoretical moments) are the same for both models - but still I wouldn't expect the shock order to matter so much!

Thanks in advance!

Re: Same Model, Differen Results

PostPosted: Wed Jan 22, 2014 4:55 pm
by jpfeifer
First, did you use pruning at second order and a long enough time series?

Second, does the problem persist if you use order=1?

Re: Same Model, Differen Results

PostPosted: Wed Jan 22, 2014 7:19 pm
by kipfilet
Hi jpfeifer,
Thank you for your prompt inquiry!

I was using pruning at second order, and I notice that the results get better as the time series increases (as in, the output of the two files becomes more similar). The results differ considerably for, say, periods=10000 , but get much better if I set the number of periods at 1 million. Still, they are not the same (which I would be tempted to blame on the fact that the shock processes are very persistent, almost unit roots).

The problem does persist for order=1, with the same "pathology" as before (it gets better as I increase the number of periods to simulate).

Re: Same Model, Differen Results

PostPosted: Thu Jan 23, 2014 7:42 am
by jpfeifer
If your model has near unit root behavior, then this is expected. The parameters that become AR1 processes get assigned random shocks that are unused. Nevertheless, this changes the random numbers for the other shocks. If you have a unit root, your series has infinite memory and all past shocks matter.