Problem running code

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.

Problem running code

Postby anup08 » Sat Feb 07, 2015 2:18 am

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 KiB) Downloaded 71 times
Attachments
modelEPR_Baseline.mod
(4.28 KiB) Downloaded 60 times
anup08
 
Posts: 6
Joined: Sat Feb 07, 2015 2:00 am

Re: Problem running code

Postby jpfeifer » Mon Feb 09, 2015 1:40 pm

You named your datafile "usedata", but the uploaded Excel file has a different name. You need to correct this.
------------
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

Re: Problem running code

Postby anup08 » Mon Feb 09, 2015 8:25 pm

jpfeifer wrote: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) ;
anup08
 
Posts: 6
Joined: Sat Feb 07, 2015 2:00 am

Re: Problem running code

Postby jpfeifer » Tue Feb 10, 2015 11:47 am

But this error occurs later than the other one. Please provide the files that provoked this error.
------------
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

Re: Problem running code

Postby anup08 » Tue Feb 10, 2015 9:16 pm

Professor, I attached all the files in my first post. Thanks for your help.
anup08
 
Posts: 6
Joined: Sat Feb 07, 2015 2:00 am

Re: Problem running code

Postby jpfeifer » Wed Feb 11, 2015 5:03 pm

Delete the empty space in the name of the worksheet in Excel (i.e. ForMatlab instead of For Matlab) and then use
Code: Select all
estimation(datafile = model3_data_mar12_2007,
           xls_sheet=ForMatlab,
------------
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

Re: Problem running code

Postby anup08 » Wed Feb 11, 2015 7:43 pm

Can't thank you enough Professor! Your suggestion seemed to have solved the problem!
anup08
 
Posts: 6
Joined: Sat Feb 07, 2015 2:00 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests