#-Command -> INCREASE ESTIMATION SPEED

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.

#-Command -> INCREASE ESTIMATION SPEED

Postby Daniel Bendel » Mon Mar 17, 2014 3:30 pm

Dear all,

with this post I only want to share my insights I got from struggeling with bayesian estimation. To increase your estimation speed please alwayse use the #-operator. I write this, because in the dynare guide this issue is not so strong underlined as it, in my view, should be.

One short example:

Say you got an easy RBC model. In these typ of models you can in general calculate the steady state in closed form solution. Then your code should look like this:
Code: Select all
var C N I W K RK Y PI;
varexo [...];

predetermined_variables K;

parameters [...]
Css Nss Iss Wss Kss RKss Yss PIss;

%NOW WRITE DOWN THE CLOSED FORM SOLUTION FOR THE STEADY STATES
Css = [...]; %some function of the deep parameter
Nss = [...];
PIss = 1;
...

model;
%NOW THE IMPORTANT PART
%DEFINE:
#C_bar = [...]; %the some function of the deep parameters as used above
#RK_bar = [...];
#PI_bar = 1;

...%model equations
%taylor rule:
RK/RK_bar = (PI/PI_bar)^(gammaa);

...
end;

initval;
C = Css;
Y = Yss;
PI = PIss;
...
end;


The use of the #-operator increases estimation's speed enormously. Why? Since Dynare is changing the parameter values during estimation (for example when trying to find the maximum of the liklihood function) in every step when changing the parameter value the steady state is obviously changing, too. But if you do not use the #-operator dynare does not change the steady state starting values and thus when the parameter values differ strongly from the calibrated values, dynare is far away from the solution and needs much time to find the steady states.

SO ALWAYS USE THE #-OPERATOR.

(The same obviously holds, when you solve your steady state with the help of an optimizer like fminsearch e.g.)

I hope I understand the #-operator right.

Perhaps, one of the dynare team members, can check my post?

I hope this helps you when estimating your models.

Best regards
Daniel
Germany, Cologne
Daniel Bendel
 
Posts: 134
Joined: Tue Nov 15, 2011 1:06 pm
Location: Cologne, Germany

Return to Dynare help

Who is online

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