Page 1 of 1

Saving coefficients with an AR(1) term

Posted: Tue Dec 30, 2008 3:13 am
by neilblake
I want to estimate an equation with an AR(1) term and save the coefficients. I can specify an equation as follows:

equation equ1.ls x1 c y1 y2 ar(1)

but this does not save the coefficients. The usual way of saving coefficients is to specify an equation like so:

equation equ1.ls x1=c(1)+c2)*y1+c(3)*y2

where the coefficients are saved as c(1), c(2) etc. You cannot, however specify an ar(1) term using this method. Do you know how I can include an AR(1) term and save the coefficients?

Re: Saving coefficients with an AR(1) term

Posted: Tue Dec 30, 2008 8:12 am
by EViews Gareth
Not quite sure what you mean by "save the coefficients", but the coefficient estimates are stored in the C vector, whether you specify an equation by list or by expression. Thus if you write your equation as:

equation equ1.ls x1 c y1 y2 ar(1)

the ar term will be in c(4).




If you want to include an AR term in an equation by expression, you can in the following way:

equation equ1.ls x1=c(1)+c(2)*y1+c(3)*y4+[ar(1)=c(4)]



Further, whether you specify your equation by list or by expression, you can access the coefficients by using the @coef data member:
scalar arterm = equ1.@coef(4)