Hi there,
I'm running a panel dataset which is unbalanced. When I try to test for redundant variables in Eviews I get this caption come up:-
"the test specifications have different samples due to NAs in original or test series. Re-estimate original equation with restricted sample and rerun test."
What does this mean?
How can I get around this so that I can carry out redundant variable tests?!
Please please help, I'm really in a pickle with this!
Thanks!
Running redundant variable test with panel data
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Running redundant variable test with panel data
This error message is somewhat self explanatory...
The redundant variables test is performed by comparing the original regression with a secondary regression, which is exactly the same apart from the fact that the test variables are dropped.
An important requirement of any sort of test that involves running a secondary regression is that the sample (i.e. the observations) used in both tests must be identical.
The way that EViews does these tests is that it takes the original regression specification, drops the test variables, and then estimates a second regression. That second regression has exactly the same specification and options as the first regression (other than the dropped variables).
Note that EViews also automatically drops an observation from an equation if that observation has an NA value for any of the variables in the equation. This feature can cause problems with secondary regression tests because it can cause the sample used in the secondary regression to be different. For example, say your original equation is:
Y C X1 X2 X3
over the sample 1990 2010
and X2 contains NAs for the year 1995 and 1996. The original equation would drop those two years from the estimation.
Suppose you then do a redundant variable test, and choose X2 as the test variable. The secondary equation is then:
Y C X1 X3
over the sample 1990 2010.
Now however there are no NAs in the equation, so the years 1995 and 1996 are no longer dropped. Thus the samples for the two equations are no longer the same, hence the error message.
As the error message points out, you can fix this, by explicitly saying in the original equation that you don't want those two years. Thus, if in the first equation you had set the sample to be
1990 2010 if X2<>NA (i.e. over the years 1990 to 2010, but only for observations where X2 is not NA)
Then that sample would be passed onto the secondary equation too, and they would both have the same sample.
The redundant variables test is performed by comparing the original regression with a secondary regression, which is exactly the same apart from the fact that the test variables are dropped.
An important requirement of any sort of test that involves running a secondary regression is that the sample (i.e. the observations) used in both tests must be identical.
The way that EViews does these tests is that it takes the original regression specification, drops the test variables, and then estimates a second regression. That second regression has exactly the same specification and options as the first regression (other than the dropped variables).
Note that EViews also automatically drops an observation from an equation if that observation has an NA value for any of the variables in the equation. This feature can cause problems with secondary regression tests because it can cause the sample used in the secondary regression to be different. For example, say your original equation is:
Y C X1 X2 X3
over the sample 1990 2010
and X2 contains NAs for the year 1995 and 1996. The original equation would drop those two years from the estimation.
Suppose you then do a redundant variable test, and choose X2 as the test variable. The secondary equation is then:
Y C X1 X3
over the sample 1990 2010.
Now however there are no NAs in the equation, so the years 1995 and 1996 are no longer dropped. Thus the samples for the two equations are no longer the same, hence the error message.
As the error message points out, you can fix this, by explicitly saying in the original equation that you don't want those two years. Thus, if in the first equation you had set the sample to be
1990 2010 if X2<>NA (i.e. over the years 1990 to 2010, but only for observations where X2 is not NA)
Then that sample would be passed onto the secondary equation too, and they would both have the same sample.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Running redundant variable test with panel data
Perhaps EViews could be made smart enough to re-use the original sample?This error message is somewhat self explanatory...
The redundant variables test is performed by comparing the original regression with a secondary regression, which is exactly the same apart from the fact that the test variables are dropped.
An important requirement of any sort of test that involves running a secondary regression is that the sample (i.e. the observations) used in both tests must be identical.
The way that EViews does these tests is that it takes the original regression specification, drops the test variables, and then estimates a second regression. That second regression has exactly the same specification and options as the first regression (other than the dropped variables).
>snip.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Running redundant variable test with panel data
For non-panels, that's exactly what it does - but in panels things are a little bit more complicated.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Running redundant variable test with panel data
All the more reason EViews should do it?For non-panels, that's exactly what it does - but in panels things are a little bit more complicated.
And, thinking of home and looking northwest, do you happen to know of company that will rent a car in Ireland to someone who is 22?
Re: Running redundant variable test with panel data
Thanks for the help guys, I'll see if I can get around this by using your method Gareth...
Cheeky I know, but are there any other software packages that will do this automatically for me? In particular will Stata do this for me?
Thanks again!
Cheeky I know, but are there any other software packages that will do this automatically for me? In particular will Stata do this for me?
Thanks again!
Re: Running redundant variable test with panel data
Ok so say I want to conduct a range of redundant variable tests on a range of different combinations of variables, should I then explicitly state in the original estimation that I want only observations where each variable is not equal to NA.
Can I impose more than one "if" condition on my sample? How??
Also, I'm assuming this will not affect the initial amount of observations in the initial regression, right?
Cheers guys!
Can I impose more than one "if" condition on my sample? How??
Also, I'm assuming this will not affect the initial amount of observations in the initial regression, right?
Cheers guys!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Running redundant variable test with panel data
It shouldn't change the number of observations in the original equation.
You can string further if conditions together with an AND:
smpl 1990 2010 if x<>na and y<>na and z<>na
You can string further if conditions together with an AND:
smpl 1990 2010 if x<>na and y<>na and z<>na
Re: Running redundant variable test with panel data
Excellent massive help, cheers guys!
One other quick question is there any difference (statistically) form running a wlad test where all coefficients are equal to zero and running a redundant variables test for all the variables?
One other quick question is there any difference (statistically) form running a wlad test where all coefficients are equal to zero and running a redundant variables test for all the variables?
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Running redundant variable test with panel data
if the model is linear, you should get identical results. If the model is nonlinear, the tests are asymptotically acquivalent but not identical.Excellent massive help, cheers guys!
One other quick question is there any difference (statistically) form running a wlad test where all coefficients are equal to zero and running a redundant variables test for all the variables?
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Running redundant variable test with panel data
I'm a little late to the party, but want to make one other comment on the sample exclusions. An easy way to string together a bunch of NA excludes is to put the variables you want to exclude in a group, say
then set your sample to drop observations that have NAs anywhere in the row
Code: Select all
group todrop x y zCode: Select all
smpl if @rnas(todrop)=0Who is online
Users browsing this forum: No registered users and 2 guests
