Bayesian Estimation - Dornbusch Model

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!!!


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;


t_bill = t_bill_star + s(+1) - s;
m_d = p(-1) + phiy - etat_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;

varobs s;

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;

var m;
periods 1:8;
values 1.1;



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

You have to add


after the estimated_param block

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_ =

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)

Error in model2 (line 169)

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

Please post the mod-file and the data-file