What is the maximum number of regressors I can use in EVIEWS? I need to estimate a model with 750 autoregressive lags.
Thank you very much!
Maximum Number of Regressors in OLS
Moderators: EViews Gareth, EViews Moderator
Re: Maximum Number of Regressors in OLS
The default size of the coefficent vector (C) is 750. However, you can always define your own coefficent vector prior to the estimation and use it instead.
-
- Posts: 36
- Joined: Sat Nov 01, 2008 12:22 pm
Re: Maximum Number of Regressors in OLS
Hello and thank you! how do I specify the size?
I mean that ok I created a coefficient vector with 1000 rows named cc. But trying to estimate an OLS from Quick-Estimate Equation with 1000 regressors I still get an error message. How can I do it?
I mean that ok I created a coefficient vector with 1000 rows named cc. But trying to estimate an OLS from Quick-Estimate Equation with 1000 regressors I still get an error message. How can I do it?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Maximum Number of Regressors in OLS
Unfortunately you can no longer estimate an equation by list if you want to use your own coefficient vector. You have to estimate by expression.
Follow us on Twitter @IHSEViews
-
- Posts: 36
- Joined: Sat Nov 01, 2008 12:22 pm
Re: Maximum Number of Regressors in OLS
EViews Gareth wrote:Unfortunately you can no longer estimate an equation by list if you want to use your own coefficient vector. You have to estimate by expression.
Dear Gareth, thank you for your reply.
I have created a vector named "CC" as the alternative coef vector with 1000 rows.
Typing:
ls price c coal(-1 to 800)
I get an error message...how can I instruct eviews to use the CC coef vector and avoid this error message?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Maximum Number of Regressors in OLS
As I said above, you can't specify by list (which is what you're doing there). You'll need to specify by expression:
and so on. Yes this is a mighty pain if you have to write out 1000 of them.
However it isn't hard to write a program that will do it for you. See below:
Code: Select all
price = cc(1) + cc(2)*coal(-1) + cc(3)*coal(-2) +
and so on. Yes this is a mighty pain if you have to write out 1000 of them.
However it isn't hard to write a program that will do it for you. See below:
Code: Select all
create u 100000
series price = nrnd
series coal = nrnd
coef(1001) cc
%regs = ""
for !i=1 to 1000
%regs = %regs + " + cc(" + @str(!i) + ")*coal(-" + @str(!i) + ")"
next
equation e1.ls price=cc(1001) {%regs}
Follow us on Twitter @IHSEViews
-
- Posts: 36
- Joined: Sat Nov 01, 2008 12:22 pm
Re: Maximum Number of Regressors in OLS
That is great! thank you very much!
-
- Posts: 4
- Joined: Mon Nov 01, 2010 2:53 am
Re: Maximum Number of Regressors in OLS
Greetings. Gareth, plse unpack what the mini prog is doing. I am fascinated. In particular, the loop.
Regards, James Johnson
Regards, James Johnson
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Maximum Number of Regressors in OLS
The loop is just building up a string.
First iteration
Second iteration
which is
and so on.
At the end %regs will be equal to
I then just use that in the regression:
First iteration
Code: Select all
%regs = "+ cc(1)*coal(-1)"
Second iteration
Code: Select all
%regs = %regs + "+ cc(2)*coal(-2)"
which is
Code: Select all
%regs = "+ cc(1)*coal(-1) + cc(2)*coal(-2)"
and so on.
At the end %regs will be equal to
Code: Select all
"+ cc(1)*coal(-1) + cc(2)*coal(-2) + cc(3)*coal(-2) + ........ + cc(1000)*coal(-1000)"
I then just use that in the regression:
Code: Select all
ls price=cc(1001) + cc(1)*coal(-1) + cc(2)*coal(-2) + cc(3)*coal(-3) + ...... + cc(1000)*coal(-1000)
Follow us on Twitter @IHSEViews
-
- Posts: 4
- Joined: Mon Nov 01, 2010 2:53 am
Re: Maximum Number of Regressors in OLS
Much thanks, Gareth. You are a good teacher. Many thanks to Perry for asking the question also.
James
James
Who is online
Users browsing this forum: Google [Bot] and 27 guests