Page 1 of 1

Estimation equation in a string

Posted: Fri Jun 13, 2014 11:41 am
by lukevancleve
Hi,

Is there an easy way to get the estimation equation as a string? say I have an equation object that when you view it has

Estimation Equation
=======================
A = C(1)B + C(2)B(-1)


Is there a

string my_eq = ?

... to get "A = C(1)B + C(2)B(-1)"

Thanks,

Luke

Re: Estimation equation in a string

Posted: Fri Jun 13, 2014 1:52 pm
by EViews Gareth
Do you want the actual values of the coefficients?

Re: Estimation equation in a string

Posted: Tue Jun 17, 2014 10:48 am
by lukevancleve
I do not.

Re: Estimation equation in a string

Posted: Tue Jun 17, 2014 10:54 am
by EViews Gareth
Unfortunately there isn't an easy way.

equation.@subst returns it with substituted coefficients (i.e. their values).


You can either freeze the representations view into a text object and pull off the line containing the expression you want:

Code: Select all

freeze(temp) equation.representations temp.svector temp2 %exp = temp2(7)
That might be tricky, because it might not always be the 7th row of the svector.

Or you could build up the expression yourself, getting the names of the variables and the coefficients from equation.@varlist and equation.@coeflist