Import Excel Datasheet

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.

Import Excel Datasheet

Postby laura » Wed Apr 08, 2009 5:58 pm

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
laura
 
Posts: 3
Joined: Sun Apr 05, 2009 3:48 pm

Re: Import Excel Datasheet

Postby SébastienVillemot » Thu Apr 09, 2009 2:56 pm

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
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Import Excel Datasheet

Postby laura » Tue Apr 14, 2009 5:55 pm

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
Attachments
model_1b.mod
(1.08 KiB) Downloaded 208 times
CH_data_1.xls
(39.5 KiB) Downloaded 205 times
laura
 
Posts: 3
Joined: Sun Apr 05, 2009 3:48 pm

Re: Import Excel Datasheet

Postby pabalo » Thu Aug 06, 2009 2:25 pm

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
pabalo
 
Posts: 3
Joined: Fri Dec 05, 2008 5:22 pm

Re: Import Excel Datasheet

Postby SébastienVillemot » Tue Aug 25, 2009 1:24 pm

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,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests