Page 1 of 1
Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 5:00 am
by kian
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!
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 10:22 am
by EViews Gareth
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.
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 11:40 am
by startz
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.
Perhaps EViews could be made smart enough to re-use the original sample?
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 12:30 pm
by EViews Gareth
For non-panels, that's exactly what it does - but in panels things are a little bit more complicated.
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 12:45 pm
by startz
For non-panels, that's exactly what it does - but in panels things are a little bit more complicated.
All the more reason EViews should do it?
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
Posted: Thu Mar 05, 2009 1:20 pm
by kian
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!
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 1:36 pm
by kian
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!
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 2:14 pm
by EViews Gareth
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
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 3:04 pm
by kian
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?
Re: Running redundant variable test with panel data
Posted: Thu Mar 05, 2009 3:15 pm
by startz
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?
if the model is linear, you should get identical results. If the model is nonlinear, the tests are asymptotically acquivalent but not identical.
Re: Running redundant variable test with panel data
Posted: Fri Mar 06, 2009 10:48 am
by EViews Glenn
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