Error in read variables for estimation

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.

Error in read variables for estimation

Postby paur » Tue Mar 31, 2009 9:22 pm

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
paur
 
Posts: 7
Joined: Thu Aug 21, 2008 2:55 am
Location: Los Angeles

Re: Error in read variables for estimation

Postby StephaneAdjemian » Wed Apr 01, 2009 7:31 am

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.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Error in read variables for estimation

Postby paur » Wed Apr 01, 2009 5:51 pm

Hi Stephane,

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

Cheers,

Paulina
Attachments
irbcdata.m
This file calls a csv file that contains the original data, but I couldn't upload it here, it doesn't allow csv extension. Let me know if you need it and I can send it by email or something.
(2.65 KiB) Downloaded 129 times
IRBC.mod
(14.34 KiB) Downloaded 97 times
paur
 
Posts: 7
Joined: Thu Aug 21, 2008 2:55 am
Location: Los Angeles

Re: Error in read variables for estimation

Postby StephaneAdjemian » Wed Apr 01, 2009 10:07 pm

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.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Error in read variables for estimation

Postby paur » Wed Apr 01, 2009 11:34 pm

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
paur
 
Posts: 7
Joined: Thu Aug 21, 2008 2:55 am
Location: Los Angeles


Return to Dynare help

Who is online

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