Steady state file when estimating a model

Hello there,
I have been trying to estimate a simple NK model. I’m estimating all parameters but those that are functions of other parameters (in this case only kappa) I would like to be read from a different file. I have read a a lot about stady state files but whenever I declare it here it doesn’t seem to work. Basically I declare all parameters I would like to estimate in the parameter section before the model except kappa (the slope of the NK Phillips Curve). I know I can do the following:

var c R infl mc n y a;

varexo e_a;

parameters bet phi phip rhoa theta sigma;

setparams_basicnk;

model(linear);
#kappa=(((1-bettheta)(1-theta))/theta);

and then go on estimating the model which works fine. But I would like this kappa parameter to be read from a separate matlab file. Whenever I try that it simply can’t recognize that such a parameter exists. Could you please help me on that?

Many thanks in advance,
Peter
basicnkest1_steadystate.m (1.36 KB)
basicnkest1.mod (1.03 KB)

In this case, you need to define

as a parameter. While it is no independent parameter, the steady state file is correctly handling the parameter dependence, which is why you are allowed to define a separate parameter.

Thanks a lot Johannes for the help. Then a quick follow-up question. I suspected this might be the case and defined “kappa” as a parameter but commented out kappa in the steady state file so the latter contained basiclly nothing. I ran the estimation and got some output which was to me quite surprising since I thought dynare should have crashed since kappa is virtually nothing. So how can I be sure that whenever I provide a steady state file I actually get the right results?

Thanks a lot

Take a look at the steady state file. It first has

% read out parameters to access them with their name NumberOfParameters = M_.param_nbr; for ii = 1:NumberOfParameters paramname = deblank(M_.param_names(ii,:)); eval( paramname ' = M_.params(' int2str(ii) ');']); end
which will read in the set parameters.

At the end

for iter = 1:length(M_.params) %update parameters set in the file eval( 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ]) end
passes the parameters back.

Thus, when you do not reset kappa in the steadystate-file, it will be passed on as it was before. In your case, it should be set to the initial value you assigned. Therefore kappa is not

but rather the value you initially assigned. I guess this happens in