Page 1 of 1

Accessing coefficients

Posted: Fri Jan 10, 2014 5:55 am
by johnclarky
Hello
I have a programme that spits out a particular regression. I would like to create a new series based on that regression equation, but I would like to force the coefficients of a couple of the explanatory variables to zero. Any suggestions for the correct programming lines?
Thanks
John

Re: Accessing coefficients

Posted: Fri Jan 10, 2014 6:15 am
by EViews Gareth
The only way to do it is to remove those variables from the equation.

Re: Accessing coefficients

Posted: Fri Jan 10, 2014 6:24 am
by johnclarky
That would create a new, incorrectly specified equation (assuming of course it was correctly specified in the first place). It would also change the estimated coefficients, which isn't what I'm trying to do.

What I would like to do is easy enough in excel. I would write the equation E=aX+bY+cZ, and just set c=0 and use the estimated coefficients a and b to create a new E. But I would like to automate this in some way through EViews. This would allow any changes to the original equation (and thus the estimated coefficients) to automatically update. Is this possible?

Thanks

Re: Accessing coefficients

Posted: Fri Jan 10, 2014 7:13 am
by EViews Gareth
You need to be a bit more precise about what you want to do with the equation post fixing.

Re: Accessing coefficients

Posted: Fri Jan 10, 2014 8:26 am
by johnclarky
No prob, let me try again:

1) I have a time series we call "E". I run a regression on E with explanatory variables X, Y and Z.
2) EViews produces an estimated equation. I now have coefficients for each of the explanatory variables X, Y and Z, as well as a constant. Let's say the constant=0.1, and the coefficients are estimated as 0.2, 0.3 and 0.4.
3) I would like to then created a new time series, we call "E2". But I would like to eliminate the effect of Z. The formula would be E2=0.1 + 0.2*X + 0.3*Y + 0.0*Z.

I would like EViews to create this new series ("E2") automatically after it runs the regression. This would allow me to run the programme with, say, a different range of data, and then generate a new series subtracting the influence of Z.

Re: Accessing coefficients

Posted: Fri Jan 10, 2014 8:33 am
by startz
Something like

Code: Select all

ls E C X Y Z series E2 = c(1)+c(2)*X+c(3)*Y

Re: Accessing coefficients

Posted: Fri Jan 10, 2014 11:11 am
by johnclarky
startz - thank you very much - that works perfectly! On the off chance that others are reading - I would just add that you can also select which equation you want to pull the coefficients from by adding "equation'sname."c(1).

Many thanks again.
J

Re: Accessing coefficients

Posted: Fri Jan 10, 2014 2:36 pm
by EViews Gareth
A slightly more tricky, but more general solution is to put the equation into a model, break the model links, edit the coefficient values, and then use the model to forecast

Re: Accessing coefficients

Posted: Wed Jan 15, 2014 8:17 am
by EViews Glenn
Alternatively, you can put it into a model, create a scenario and override the Z variable, filling it with 0's.