setting problems: "periods" and "stoch_simul"
Posted: Mon Aug 10, 2009 11:31 am
Dear all
I am trying to run the Hansen model and have some findings. It would be good if you can confirm what I think.
When I tried to run the stoch_simul in dynare 4, it got two different results with the settings of "periods" and "stoch_simul" and computed results. ( it's kind of I am playing with them). Let me use different situations to explain:
===========================================================================
Situation 1: if i set
--------------------------------------------------------------------------------------------------------
periods 20100;
:
:
:
stoch_simul(hp_filter = 1600, order = 1);
statistic1 = 100*sqrt(diag(oo_.var(1:7,1:7)))./oo_.mean(1:7)';
--------------------------------------------------------------------------------------------------------
The above codes can work but the results are totally out of that of the original paper.
===========================================================================
===========================================================================
Situation 2: if i set
--------------------------------------------------------------------------------------------------------
%periods 20100; <---(which mean i do not run this code):
:
stoch_simul(hp_filter = 1600, order = 1);
statistic1 = 100*sqrt(diag(oo_.var(1:7,1:7)))./oo_.mean(1:7)';
--------------------------------------------------------------------------------------------------------
The above codes cannot work for the last line. But if i change the last line to be
statistic1 = 100*sqrt(diag(oo_.var(1:7,1:7)))./oo_.mean(1:7);
which means not transpose the mean of variables, and the above codes work.
===========================================================================
Now my questions are
(1) when i want to run "hp filter", is that necessary to set the "periods"?
(2) can someone tell me that the Hansen model runs with simulation or not. It seems that the hp_filter does the simulation job already, and i don't need to set "periods" again, otherwise the results (e.g. the standard deviation of variables) will be too big.
(3) if it is no need to run "periods" when i run Hansen model, then what case for setting the "periods" and "stoch_simul" at the same time?
(4) why sometime we need to transpose the mean figures and somtimes don't?
Thanks for all the sharing and solving my confusions.
I am trying to run the Hansen model and have some findings. It would be good if you can confirm what I think.
When I tried to run the stoch_simul in dynare 4, it got two different results with the settings of "periods" and "stoch_simul" and computed results. ( it's kind of I am playing with them). Let me use different situations to explain:
===========================================================================
Situation 1: if i set
--------------------------------------------------------------------------------------------------------
periods 20100;
:
:
:
stoch_simul(hp_filter = 1600, order = 1);
statistic1 = 100*sqrt(diag(oo_.var(1:7,1:7)))./oo_.mean(1:7)';
--------------------------------------------------------------------------------------------------------
The above codes can work but the results are totally out of that of the original paper.
===========================================================================
===========================================================================
Situation 2: if i set
--------------------------------------------------------------------------------------------------------
%periods 20100; <---(which mean i do not run this code):
:
stoch_simul(hp_filter = 1600, order = 1);
statistic1 = 100*sqrt(diag(oo_.var(1:7,1:7)))./oo_.mean(1:7)';
--------------------------------------------------------------------------------------------------------
The above codes cannot work for the last line. But if i change the last line to be
statistic1 = 100*sqrt(diag(oo_.var(1:7,1:7)))./oo_.mean(1:7);
which means not transpose the mean of variables, and the above codes work.
===========================================================================
Now my questions are
(1) when i want to run "hp filter", is that necessary to set the "periods"?
(2) can someone tell me that the Hansen model runs with simulation or not. It seems that the hp_filter does the simulation job already, and i don't need to set "periods" again, otherwise the results (e.g. the standard deviation of variables) will be too big.
(3) if it is no need to run "periods" when i run Hansen model, then what case for setting the "periods" and "stoch_simul" at the same time?
(4) why sometime we need to transpose the mean figures and somtimes don't?
Thanks for all the sharing and solving my confusions.