Bayesian Estimation - Dornbusch Model

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.

Bayesian Estimation - Dornbusch Model

Postby felipe.klein » Thu May 15, 2014 5:31 am

Hi All,

I'm trying to estimate Dornbusch's model and I get the following error:

ERROR: model2.mod: line 51, col 11: syntax error, unexpected '(', expecting COMMA
Error using dynare (line 174)
DYNARE: preprocessing failed

May I please ask for some advice on how to solve this. As per the highlighted error, I should include a "," after the command "estimation" which does not make sense. Please find below the code. Thank you very much in advance for your help!

Also, could anyone help me on how to forecast with this code. I mean, the last observation of the monthly fx rate is as of April 2014 and I would like to run the model in order to get May 14, June 14, etc. Is this possible? Thanks!!!


Felipe

var epsilon p s m_d y_d y t_bill;
varexo t_bill_star p_star m epsilon_bar y_bar g;
parameters delta, eta, psi, phi;

delta=0.5;
eta=1;
psi=0.5;
phi=0.5;

model;
t_bill = t_bill_star + s(+1) - s;
m_d = p(-1) + phi*y - eta*t_bill;
epsilon = s + p_star - p;
y_d = y_bar + delta*(s + p_star - p(-1) - epsilon_bar) + g;
p - p(-1) = psi*(y_d - y_bar) + s(+1) - s;
y_d = y;
m_d = m;
end;

varobs s;

initval;
epsilon_bar = 1;
epsilon = 1;
y_bar = 1;
p_star = 1;
p = 1;
t_bill_star = 0.5;
t_bill = 0.5;
m = 1;
m_d = 1;
g = 0;
end;

shocks;
var m;
periods 1:8;
values 1.1;
end;

steady;

check;

estimated_params;
delta, beta_pdf, 0.35, 0.02;
eta, beta_pdf, 0.99, 0.002;
psi, beta_pdf, 0.25, 0.05;
phi, beta_pdf, 0.30, 0.04;

estimation(datafile=fxchile,nobs=364,loglinear,mh_replic=2000,mode_compute=4,mh_nblocks=2,mh_drop=0.45,mh_jscale=0.65,diffuse filter);
felipe.klein
 
Posts: 20
Joined: Mon May 12, 2014 1:15 pm

Re: Bayesian Estimation - Dornbusch Model

Postby federico » Thu May 15, 2014 7:20 am

You have to add

end;

after the estimated_param block
federico
 
Posts: 68
Joined: Fri Mar 30, 2012 4:46 pm

Re: Bayesian Estimation - Dornbusch Model

Postby felipe.klein » Thu May 15, 2014 1:32 pm

Thank you very much!

Unfortunately, when running the model now I am getting other error. Could anyone please assist with this? I made sure to input data in the .xls file with the same name as in the model: "s". Thank you all again.


You did not declare endogenous variables after the estimation/calib_smoother command.


Error using load_xls_file_data (line 113)
load_xls_file_data: I am not able to read the dates!

Error in read_variables (line 92)
[freq,init,data,varlist] = load_xls_file_data(fullname,xls_sheet,xls_range);

Error in initialize_dataset (line 32)
rawdata = read_variables(datafile,varobs,[],xls.sheet,xls.range);

Error in dynare_estimation_init (line 471)
dataset_ =
initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);

Error in dynare_estimation_1 (line 81)
[dataset_,xparam1, hh, M_, options_, oo_, estim_params_,bayestopt_] =
dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_);

Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

Error in model2 (line 169)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin('base',fname) ;

>>
felipe.klein
 
Posts: 20
Joined: Mon May 12, 2014 1:15 pm

Re: Bayesian Estimation - Dornbusch Model

Postby jpfeifer » Thu May 15, 2014 2:28 pm

Please post the mod-file and the data-file
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests