Page 1 of 1

Import Excel Datasheet

PostPosted: Wed Apr 08, 2009 5:58 pm
by laura
Dear All,

I will run an estimation of a DSGE model, my data are in an Excel Datasheet. I have tried different ways in order to import these data, but it doesn't work. Can somebody help me, please?

Bests
laura

Re: Import Excel Datasheet

PostPosted: Thu Apr 09, 2009 2:56 pm
by SébastienVillemot
Hi,

Please give us more details about your problem (at least the error message and maybe your MOD-file). We can't provide any help otherwise.

Sébastien

Re: Import Excel Datasheet

PostPosted: Tue Apr 14, 2009 5:55 pm
by laura
I'll send you my Excel sheet, my .mod file and the following error in running it.

Errors:
??? Subscripted assignment dimension mismatch.

Error in ==> read_variables at 69
dyn_data_01(:,dyn_i_01) = dyn_tmp_01;

Error in ==> dynare_estimation_1 at 237
rawdata = read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> model_1b at 142
dynare_estimation(var_list_);

Error in ==> dynare at 102
evalin('base',fname) ;

If you can help me, it could be great.

Thanks in advance

laura

Re: Import Excel Datasheet

PostPosted: Thu Aug 06, 2009 2:25 pm
by pabalo
Hi Laura, sorry for bothering you, but I want to ask you if you have learned how to read (or to import) data from an excel file. I will be very grateful if you could help me with this.

Thanks

Pablo

laura wrote:Dear All,

I will run an estimation of a DSGE model, my data are in an Excel Datasheet. I have tried different ways in order to import these data, but it doesn't work. Can somebody help me, please?

Bests
laura

Re: Import Excel Datasheet

PostPosted: Tue Aug 25, 2009 1:24 pm
by SébastienVillemot
Hi,

The Excel file posted by Laura was wrong: the first line should contain the variables names, and the data should begin at the second line. Hence the crash.

It is perfectly possible to use an Excel file for estimation, with the options "datafile", "xls_sheet" and "xls_range" of the "estimation" command. Please look at the reference manual for more details.

Best,