Page 1 of 1
Parameter dependence and # operator
Posted:
Fri Aug 21, 2015 4:51 pm
by econ86
Dear all,
When estimating DSGE model, I'm taking into account parameter dependence. My question is: where are the calculated SS relations that make use of # operator stored after the estimation?
Best,
Re: Parameter dependence and # operator
Posted:
Fri Aug 21, 2015 6:17 pm
by jpfeifer
They are not stored at all. If you want them to be stored, you need to define them as parameters and use a steady_state_model block to make sure they are correctly updated in every draw.
Re: Parameter dependence and # operator
Posted:
Sat Aug 22, 2015 6:41 am
by econ86
Dear J. Pfeifer,
If I understand you correctly, this is the same as using # operator with the only difference being that in this case the calculated SS relations are stored. Am I right?
Best.
Re: Parameter dependence and # operator
Posted:
Sat Aug 22, 2015 9:08 am
by jpfeifer
Yes. The #operator is basically a placeholder where the preprocessor, whenever such an expression is encoutered, is replaced by the right-hand side of the definition. Thus, the model-local do not exist anymore when the model is run as they are simply replaced by the expression involving the original parameters.
In contrast, the steady_state_model block allows storing such expressions. The reason is that you are defining a separate parameter that is stored, but because the steady state file is executed every time the model is solved the parameters are correctly updated when you specify the dependencies correctly.
Re: Parameter dependence and # operator
Posted:
Sat Aug 22, 2015 12:00 pm
by econ86
Ok, but I still have a problem. Now I have the following:
var mu_zhat epsilon Upsilon z_tildestar zeta_c ...
varexo epsilon_muz epsilon_epsilon epsilon_Upsilon ...
parameters beta alpha eta_c sigma_a sigma_L ... (b_w and y_bar are not declared here)
beta=0.995;
//b_w = (lambda_w*sigma_L-(1-lambda_w))/((1-beta*xi_w)*(1-xi_w)); // Wage equation parameter
//y_bar =(1/lambda_d)*((mu_z)^(-alpha))*((k_H)^(alpha))*H; // SS output
etc.
model(linear);
....
#b_w = (lambda_w*sigma_L-(1-lambda_w))/((1-beta*xi_w)*(1-xi_w)); // Wage equation parameter
#y_bar =(1/lambda_d)*((mu_z)^(-alpha))*((k_H)^(alpha))*H; // SS output
etc.
When using the steady_state_model I would have:
var mu_zhat epsilon Upsilon z_tildestar zeta_c ...
varexo epsilon_muz epsilon_epsilon epsilon_Upsilon ...
parameters beta alpha eta_c sigma_a sigma_L ... b_w and y_bar
beta=0.995;
//b_w = (lambda_w*sigma_L-(1-lambda_w))/((1-beta*xi_w)*(1-xi_w)); // Wage equation parameter
//y_bar =(1/lambda_d)*((mu_z)^(-alpha))*((k_H)^(alpha))*H; // SS output
etc.
model(linear);
....
end;
steady_state_model;
b_w = (lambda_w*sigma_L-(1-lambda_w))/((1-beta*xi_w)*(1-xi_w)); // Wage equation parameter
y_bar =(1/lambda_d)*((mu_z)^(-alpha))*((k_H)^(alpha))*H; // SS output
end;
etc.
I'm not sure whether this is correct.
Re: Parameter dependence and # operator
Posted:
Sat Aug 22, 2015 1:04 pm
by jpfeifer
Looks good to me.
Re: Parameter dependence and # operator
Posted:
Sun Aug 23, 2015 10:12 am
by econ86
I placed all the parameters and SS relations that are dependent on the estimated parameters under the steady_state_model block as described in my previous post, but when running the estimation, I encounter the following problem:
Error using print_info (line 72)
The steadystate file did not compute the steady state
Error in print_info (line 72)
error('The steadystate file did not compute the steady
state')
Error in initial_estimation_checks (line 69)
print_info(info, DynareOptions.noprint, DynareOptions)
Error in dynare_estimation_1 (line 179)
oo_ =
initial_estimation_checks(objective_function,xparam1,dataset_,M_,estim_params_,options_,bayestopt_,oo_);
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in model1 (line 1058)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;
Re: Parameter dependence and # operator
Posted:
Sun Aug 23, 2015 4:06 pm
by jpfeifer
When your model is linear, this is impossible. Please provide the files.
Re: Parameter dependence and # operator
Posted:
Sun Aug 23, 2015 5:35 pm
by econ86
Yes, I use the well-known model of Adolfson et al. which is also included in the Macroeconomic Model Data Base (name EA_SR07). It is log-linearized, variables are expressed as percentage deviations from SS (hat variables).
So, with that model the best way is to use the pound operator # in front of the parameters and SS relations that are dependent on the estimated parameters?
Re: Parameter dependence and # operator
Posted:
Sun Aug 23, 2015 5:47 pm
by jpfeifer
I need the files to replicate the issue.
Re: Parameter dependence and # operator
Posted:
Sun Aug 30, 2015 3:21 pm
by jpfeifer
This has to do with the fact that you have a linear model with variables that contain constant terms. You need to provide analytical solutions for these variables when you use a steady_state_model block. You could use the initval-block values from my other response to your model:
http://www.dynare.org/phpBB3/viewtopic.php?f=1&p=21202#p21202