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
Accessing coefficients
Moderators: EViews Gareth, EViews Moderator

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12288
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Accessing coefficients
The only way to do it is to remove those variables from the equation.
Follow us on Twitter @IHSEViews

 Posts: 4
 Joined: Fri Jan 10, 2014 5:39 am
Re: Accessing coefficients
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
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

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12288
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Accessing coefficients
You need to be a bit more precise about what you want to do with the equation post fixing.
Follow us on Twitter @IHSEViews

 Posts: 4
 Joined: Fri Jan 10, 2014 5:39 am
Re: Accessing coefficients
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.
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.

 Nonnormality and collinearity are NOT problems!
 Posts: 3497
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Accessing coefficients
Something like
Code: Select all
ls E C X Y Z
series E2 = c(1)+c(2)*X+c(3)*Y

 Posts: 4
 Joined: Fri Jan 10, 2014 5:39 am
Re: Accessing coefficients
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
Many thanks again.
J

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12288
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Accessing coefficients
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
Follow us on Twitter @IHSEViews

 EViews Developer
 Posts: 2615
 Joined: Wed Oct 15, 2008 9:17 am
Re: Accessing coefficients
Alternatively, you can put it into a model, create a scenario and override the Z variable, filling it with 0's.
Return to “General Information and Tips and Tricks”
Who is online
Users browsing this forum: No registered users and 2 guests