Fixing some parameters, then estimating the remaining ones

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.

Fixing some parameters, then estimating the remaining ones

Postby BARATTIE » Wed Nov 25, 2009 10:03 pm

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
BARATTIE
 
Posts: 6
Joined: Wed May 21, 2008 1:50 am

Re: Fixing some parameters, then estimating the remaining ones

Postby AssiaEzzeroug » Thu Nov 26, 2009 9:47 am

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
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: Fixing some parameters, then estimating the remaining ones

Postby BARATTIE » Thu Nov 26, 2009 1:43 pm

I guess you need the following three files...any help is deeply appreciated!

barattie
Attachments
usmodel_data.xls
the data used in the estimation
(191 KiB) Downloaded 91 times
usmodel_stst.m
something called by the mod file
(868 Bytes) Downloaded 88 times
usmodel_BBG.mod
mod file
(12.16 KiB) Downloaded 109 times
BARATTIE
 
Posts: 6
Joined: Wed May 21, 2008 1:50 am

Re: Fixing some parameters, then estimating the remaining ones

Postby AssiaEzzeroug » Fri Nov 27, 2009 10:20 am

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
Attachments
usmodel_BBG.mod
(12.88 KiB) Downloaded 133 times
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm


Return to Dynare help

Who is online

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