Hi,
Does anyone know what is the maximum number of regressors we can add the LHS of an equation in Eviews? It seems to me that I could not add more than 1000 regressors in 1 equation. If so, I just don't know if there is anyway that I can compare the coefficient of a regression (with fixed time and cross-sectin effect) across 3 (or more) subsamples?
To be specific, in an unbalance dated panel, I want to run a regression with fixed period and cross-section effects in three subsamples (categorized by SIZE, which could be 1, 2 or 3), say: equation e.ls(cx=f,per=f) y c x1 x2. Theoretically, interaction terms would help in this case. So I interact SIZE dummy variables with each of the regressor, say: equation e1.ls(cx=f,per=f) y c x1 x2 @expand(size,@dropfirst) @expand(size,@dropfirst)*x1 @expand(size,@dropfirst)*x2
However, it seems problematic because SIZE dummies need to also interact with the time (identified by YEAR) and cross-section (identified by CO) fixed effect dummies. So I think I need to add two more terms to the equation above, say: e1.ls(cx=f,per=f) y c x1 x2 @expand(size,@dropfirst) @expand(size,@dropfirst)*x1 @expand(size,@dropfirst)*x2 @expand(size,@dropfirst)*@expand(year,@dropfirst) @expand(size,@dropfirst)*@expand(co,@dropfirst)
Then I've got the problem. Eviews warns "1225 is not a valid index for vector-series-coefficient C". I guess I have exceed the maximum number of regressors. What can I do in this case?
I guess I can't proceed with the interaction approach. I think the Wald test could do, but just don't know how. The procedures instructed in Eviews Guide II, p176 seem to be applicable only when I want to compare the whole model across sub-samples, not a certain pair of coefficients. The built-in Eviews' Factor Breakpoint test is not available for panel data.
I read quite a lot on the topic during the last week and I know that this can be done quite easily by a built-in command in SAS, but I still want to stay with Eviews.
My appologies if any of my explaination above is wrong or confusing.
Please could anyone help? Any help is really appreciated!
Maximum number of regressors in Eviews
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Maximum number of regressors in Eviews
If you're using the default C vector for your coefficients then the maximum is 760ish (if I remember correctly). If you use your own coefficient vector, the limit is much much higher. Unfortunately if you specify an equation by list (and you are), you cannot use your own coif vector.
Thus you'll have to estimate your equation by expression, which in your case will be extremely tedious since @expand will not work.
Thus you'll have to estimate your equation by expression, which in your case will be extremely tedious since @expand will not work.
Re: Maximum number of regressors in Eviews
Thank you very much Gareth. However, does it mean that this is the only way to go ahead? I guess there should be an easier way to get round the problem. What about the Wald test, do you know how to perform a Wald test to compare the coefficient on X1 when SIZE=1 with the corresponding coefficient when SIZE=3 (of course when time and cross-section fixed effects are included)?
I am really running out of ideas now, so any further suggestion would be whole-heartedly appreciated. Thanks!
I am really running out of ideas now, so any further suggestion would be whole-heartedly appreciated. Thanks!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Maximum number of regressors in Eviews
Since you're in a panel, I think that's the only way to go.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Maximum number of regressors in Eviews
Actually, Glenn has just pointed out that I am wrong. Since we were worried about people having this sort of issue in Panels, we actually let you change the default coefficient vector even when estimating by list.
Thus all you need to do is create your own (large) coefficient vector, and then on the Options page of the equation estimation dialog, put the name of that coefficient vector in the Coefficient Name box.
Thus all you need to do is create your own (large) coefficient vector, and then on the Options page of the equation estimation dialog, put the name of that coefficient vector in the Coefficient Name box.
Re: Maximum number of regressors in Eviews
Thank you again Gareth! I tried your suggestion, but it doesn't seem to be a practical solution because Eviews keeps warning "Out of memory" (although I believe my laptop is not too bad). My panel has 18 periods and 1677 cross-sections. And there's just another matter (purely econometrics) of running up against the degrees of freedom as a consequence of introducing too many interaction terms.
I believe there are other Eviews users who are interested in doing this kind of comparison test and stucked at the "how" question. So please bear with me to see if we can find a practicable way to resolve this. The only two things remain in my mind now are:
1. Can we estimate three equations (within each subgroup when Size=1, 2 and 3) simultaneously (e.g. as a system) and then perfom a Wald test to compare the coefficents across equations? I just don't know how to set different samples for different equations in an equation --> any suggestion or is it possible at all?
2. Can we perform a Wald test of structural change of a SINGLE coefficient (rather than the whole model) across sub-samples? I quote from Eviews User Guide (p178) the instruction for performing a Wald test when researchers want to compare the whole model across sub-samples and MY QUESTION is: can we adjust the test so that we can compare a single coefficient rather than the whole model?
"suppose we have a quarterly sample of 1947:1–1994:4 and wish to test whether there was a structural change in the consumption function in 1973:1. First, estimate the model in the first sample and save the results by the commands:
coef(2) b1
smpl 1947:1 1972:4
equation eq_1.ls log(cs)=b1(1)+b1(2)*log(gdp)
sym v1=eq_1.@cov
...
Similarly, estimate the model in the second sample and save the results by the commands:
coef(2) b2
smpl 1973:1 1994:4
equation eq_2.ls log(cs)=b2(1)+b2(2)*log(gdp)
sym v2=eq_2.@cov
...
To compute the Wald statistic, use the command:
matrix wald=@transpose(b1-b2)*@inverse(v1+v2)*(b1-b2)
..."
Thanks again for your effort put into this topic, and I really appreciate any further helps.
I believe there are other Eviews users who are interested in doing this kind of comparison test and stucked at the "how" question. So please bear with me to see if we can find a practicable way to resolve this. The only two things remain in my mind now are:
1. Can we estimate three equations (within each subgroup when Size=1, 2 and 3) simultaneously (e.g. as a system) and then perfom a Wald test to compare the coefficents across equations? I just don't know how to set different samples for different equations in an equation --> any suggestion or is it possible at all?
2. Can we perform a Wald test of structural change of a SINGLE coefficient (rather than the whole model) across sub-samples? I quote from Eviews User Guide (p178) the instruction for performing a Wald test when researchers want to compare the whole model across sub-samples and MY QUESTION is: can we adjust the test so that we can compare a single coefficient rather than the whole model?
"suppose we have a quarterly sample of 1947:1–1994:4 and wish to test whether there was a structural change in the consumption function in 1973:1. First, estimate the model in the first sample and save the results by the commands:
coef(2) b1
smpl 1947:1 1972:4
equation eq_1.ls log(cs)=b1(1)+b1(2)*log(gdp)
sym v1=eq_1.@cov
...
Similarly, estimate the model in the second sample and save the results by the commands:
coef(2) b2
smpl 1973:1 1994:4
equation eq_2.ls log(cs)=b2(1)+b2(2)*log(gdp)
sym v2=eq_2.@cov
...
To compute the Wald statistic, use the command:
matrix wald=@transpose(b1-b2)*@inverse(v1+v2)*(b1-b2)
..."
Thanks again for your effort put into this topic, and I really appreciate any further helps.
Re: Maximum number of regressors in Eviews
Hello!
Can you help me with Log likelihood ratio in Factor Breakpoint test?
in manual i find a formula LP=-2(l~-l^), but this test for model with restricted regression. In Factor BT i have 1 big regression and two regressions are drawn from the first. => i can't apply this formula.
Thanks in advance, Ira
Can you help me with Log likelihood ratio in Factor Breakpoint test?
in manual i find a formula LP=-2(l~-l^), but this test for model with restricted regression. In Factor BT i have 1 big regression and two regressions are drawn from the first. => i can't apply this formula.
Thanks in advance, Ira
Re: Maximum number of regressors in Eviews
Does Eviews 7 have a fixed maximum number of regressors? (Given that the size of the coefficient vector is apparently not a restriction). Or is the only restriction the available RAM?
For example, Stata reports a fixed maximum number of regressors (http://www.stata.com/products/which-sta ... ht-for-me/).
If the only restriction is the available RAM, does anybody have any idea what given the current available RAM sizes the restriction of Eviews is in practice?
Any thoughts are appreciated.
For example, Stata reports a fixed maximum number of regressors (http://www.stata.com/products/which-sta ... ht-for-me/).
If the only restriction is the available RAM, does anybody have any idea what given the current available RAM sizes the restriction of Eviews is in practice?
Any thoughts are appreciated.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Maximum number of regressors in Eviews
There is no fixed number (at least as far as I am aware), it is only limited by memory. The exact amount that gives is tricky, since it depends on too many factors.
Re: Maximum number of regressors in Eviews
Thank you, Gareth.
Who is online
Users browsing this forum: No registered users and 2 guests
