Problem running code

Hi,

I am very new to Dynare. I was trying to run the attached “modelEPR_Baseline.dyn” file on Dynare 4.4.3. But it seemed that Dynare cannot run a file with “dyn” extension. Therefore I changed the extension of the file from “dyn” to “mod”. After running the file with renamed extension, Dynare gives me the following message:

"You did not declare endogenous variables after the estimation/calib_smoother command.
Posterior IRFs, posterior moments, smoothed variables and forecasts will be
computed for the 35 endogenous variables of your model, this
can be very long…

Choose one of the following options:

[1] Consider all the endogenous variables.
[2] Consider all the observed endogenous variables.
[3] Stop Dynare and change the mod file."

I was not sure which one to pick, but I picked [2] anyway. After that Dynare again encounters problem and gives me the following message:

??? Error using ==> read_variables at 60
Can’t find datafile: usedata.{m,mat,xls,xlsx,csv}

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

Error in ==> dynare_estimation_init at 475
dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);

Error in ==> dynare_estimation_1 at 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 at 89
dynare_estimation_1(var_list,dname);

Error in ==> code at 330
dynare_estimation(var_list_);

Error in ==> dynare at 180
evalin(‘base’,fname) ;


Please suggest me what should I do to or what’s missing…

Attachment:model3_data_mar12_2007.xls (75.5 KB)
modelEPR_Baseline.mod (4.28 KB)

You named your datafile “usedata”, but the uploaded Excel file has a different name. You need to correct this.

Dear Professor:

Thanks for your reply. I already did that before. But that gave me the following errors:

??? Error using ==> load_xls_file_data at 117
load_xls_file_data: I am not able to read the dates!

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

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

Error in ==> dynare_estimation_init at 475
dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);

Error in ==> dynare_estimation_1 at 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 at 89
dynare_estimation_1(var_list,dname);

Error in ==> modelEPR_Baseline at 330
dynare_estimation(var_list_);

Error in ==> dynare at 180
evalin(‘base’,fname) ;

But this error occurs later than the other one. Please provide the files that provoked this error.

Professor, I attached all the files in my first post. Thanks for your help.

Delete the empty space in the name of the worksheet in Excel (i.e. ForMatlab instead of For Matlab) and then use

estimation(datafile = model3_data_mar12_2007, xls_sheet=ForMatlab,

Can’t thank you enough Professor! Your suggestion seemed to have solved the problem!