Page 1 of 1

Fixing some parameters, then estimating the remaining ones

PostPosted: Wed Nov 25, 2009 10:03 pm
by BARATTIE
dear all,

pretty simple. I have a code (the smets wouters 2007 from AER website) and it works. Now I want simply to fix one parameter to a certain value and re-estimate the other parameters of the model. I thought it was enough to fix the parameter in the parameter section of the code to the desired level and comment out that parameter from the list of parameters to be estimated. It does not work. I get the follwing error message:

??? Error using ==> lt
Matrix dimensions must agree.

Error in ==> DsgeLikelihood at 17
if options_.mode_compute ~= 1 & any(xparam1 < bayestopt_.lb)

Error in ==> initial_estimation_checks at 20
[fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data);

Error in ==> dynare_estimation at 249
initial_estimation_checks(xparam1,gend,data);

Error in ==> usmodel_BBG at 335
dynare_estimation(var_list_);

Error in ==> dynare at 26
evalin('base',fname) ;

ever happened to anybody? any idea? It seems as if xparam1 is keeping track of the number of parameters to estimate...but I'm certainly not an expert of bayesian estimation in dynare...

thanks a lot
happy thanksgiving!

barattie

Re: Fixing some parameters, then estimating the remaining ones

PostPosted: Thu Nov 26, 2009 9:47 am
by AssiaEzzeroug
Hi,

well I guess what you did should be sufficient provided you didnt forget to declare it in the block "parameters"..
Could you post your mod-file?

Thanks

Re: Fixing some parameters, then estimating the remaining ones

PostPosted: Thu Nov 26, 2009 1:43 pm
by BARATTIE
I guess you need the following three files...any help is deeply appreciated!

barattie

Re: Fixing some parameters, then estimating the remaining ones

PostPosted: Fri Nov 27, 2009 10:20 am
by AssiaEzzeroug
Hi,

first the way you choose to update parameters to be estimated in your mod-file by calling the function usmodel_stst.m, doesnt work on my machine, maybe due to a different Dynare version (I'm using v4).
Actually, I'm used to update parameters I wanna estimate by including them directly inside the block "model" and removing their names from the block "parameters". Plz see the attached file.

Besides, there's smth I don't really get in your paramaters definition. precisely I dont see the point to create auxiliary variables as "constepinf". For instance, you wanna estimate the parameter "cpie". So you set its value to 1.005 at the beginning, then you redefine it as follows cpie=1+constepinf/100, knowing that constepinf=(cpie-1)*100. Why don't you write down directly inside the block model: #cpie=1.005 ?

Best