Page 1 of 1

Extract substituted coefficients form for an Equation

Posted: Fri Dec 17, 2010 3:51 pm
by CharlesLogan
Hi All,

I am trying to obtain the Substituted Coefficient representation of a numerous amount of equations. More specifically, the equations are part of different Model objects. What I have to do is manually go into each equation and copy & paste each Endogenous equation from Eviews to notepad.

Can someone please advise how to extract these equations out systematically, such as into a Spool object?

For example, I would like to go through all my Model objects and output all the Equations that are part of the Model in a Spool object.

Thank you!

Re: Extract substituted coefficients form for an Equation

Posted: Fri Dec 17, 2010 4:23 pm
by EViews Glenn
There are two parts to this question. First, for a given equation, you can get the substituted coefficients representation using the @subst equation data member. As in...

Code: Select all

string a = eq01.@subst
As to the second part (getting all of the equation names out of a model), I'm not sure there's an easy way. Perhaps someone can chime in there...

Re: Extract substituted coefficients form for an Equation

Posted: Sat Dec 18, 2010 11:24 am
by CharlesLogan
Thank you - @subst does exactly what I was looking for.

The 2nd part of the question is how to extract a specific equation out of a model so that I can call @subst on the equation object.

Extract substituted coefficients form for an Equation

Posted: Sat Dec 18, 2010 11:56 am
by EViews Gareth
I don't believe there is currently a way to do it.

Re: Extract substituted coefficients form for an Equation

Posted: Sat Dec 18, 2010 12:51 pm
by CharlesLogan
Thanks - perhaps I can step back and explain what I am doing as you may have a suggestion on a different route to the end goal.

I am estimating two equations via the logl object. In order to get the substituted coefficient representation of the two equations, I have to "Make Model" from the logl object, and then from the Model object I have to manually open it up, select each equation separately, and copy & paste the substituted coefficients.

Is there a way to do this without making a model -- perhaps go straight to the Equation objects from the estimated logl object?

Thank you!

Re: Extract substituted coefficients form for an Equation

Posted: Sat Dec 18, 2010 4:20 pm
by EViews Gareth
ok, slight confusion over your use of the term Equation. You don't actually have any equation objects. You have a model object containing some LogL objects. The @subst data member is not available for LogL objects, so that isn't going to be any help to you :(

Further the LogL object currently offers no way to access the substituted coefficient string, other than the hack you found by putting them into a model. Thus for what you want to do, the only way is the method you have currently found - copy and pasting from the model object.

We have on our list of things to implement a way of obtaining a list of the objects inside a model object. However this won't help you at all, since you have LogL objects inside your model rather than equations, and knowing the names of the LogL object is useless to you since, the LogL won't let you get to the substituted coefficients string.

We'll add that as something to think about to.

Re: Extract substituted coefficients form for an Equation

Posted: Sun Dec 19, 2010 5:11 pm
by CharlesLogan
You raise some good points. I think it boils down to getting access to the equations inside a logl object. From the Model object, I can pull up the equations that I want because they have a name associated with them.
Could this kind of feature be created through an Add-In?

Re: Extract substituted coefficients form for an Equation

Posted: Sun Dec 19, 2010 6:30 pm
by EViews Gareth
No. As I said, you're not dealing with equations at all. Just LogLs. LogLs don't have any where near as much functionality as equations. Thus nothing can be done until we add that functionality, which can only be done internally, not through the EViews programming language (which is what Add-ins use).