Page 1 of 1

Error in read variables for estimation

PostPosted: Tue Mar 31, 2009 9:22 pm
by paur
Hi everyone,

I'm getting an error that I haven't been able to solve and I'm desperate now.

I'm running dynare on a mac (just in case this matters). When the code gets to the estimation command, I pass on the datafile which
is an m file and it has all the observables. Then dynare says that there is an error in read_variables and it says "Reference to a cleared variable var_names_01".

I think var_names_01 is the same options_.varobs, is this true? does anyone have any idea what this error mean? let me know if more specific information is needed.

Its not my first time estimating in dynare, I have another model and it worked just fine.

I would really appreciate any help.

Paulina

Re: Error in read variables for estimation

PostPosted: Wed Apr 01, 2009 7:31 am
by StephaneAdjemian
Hi Paulina, Can you post a mod file and a data file replicating your problem ? Yes, var_names_01 is an array of strings containing the names of the observed endogenous variables.

Best, Stéphane.

Re: Error in read variables for estimation

PostPosted: Wed Apr 01, 2009 5:51 pm
by paur
Hi Stephane,

Thank you so much for your response. Here are the files.

Cheers,

Paulina

Re: Error in read variables for estimation

PostPosted: Wed Apr 01, 2009 10:07 pm
by StephaneAdjemian
Hi Paulina,

The problem is in the matlab script irbcdata.m, where you load the data. In this file you clear all the variables in the matlab's workspace. If you remove the first line, it should be ok.

Regards,
Stéphane.

Re: Error in read variables for estimation

PostPosted: Wed Apr 01, 2009 11:34 pm
by paur
Hi Stephane!! You are totally right... I didn't realize that that matlab command would clear the variables created by dynare.

Thank you so much it could have taken me ages to realize that.

Thanks again!

Paulina