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,

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,

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.

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.

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.

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.

Looks good to me.

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) ;

When your model is linear, this is impossible. Please provide the files.

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?

I need the files to replicate the issue.

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: [Steady state values in log-linearized model: Problem)