David David - 29 days ago 13
R Question

Test for Multicollinearity in Panel Data R

I am running a panel data regression using the

plm
package in
R
and want to control for multicollinearity between the explanatory variables.

I know there is the
vif()
function in the
car
-package, however as far as I know, it cannot deal with panel data output.

The
plm
can do other diagnostics such as a unit root test but I found no method to calculate for multicollinearity.



Is there a way to calculate a similar test to
vif
, or can I just regard each variable as a time-series, leaving out the panel information and run tests using the
car
package?




I cannot disclose the data, but the problem should be relevant to all panel data models.

The dimension is roughly 1,000 observations, over 50 time-periods.

The code I use looks like this:

pdata <- plm.data(RegData, index=c("id","time"))
fixed <- plm(Y~X, data=pdata, model="within")


and then


vif(fixed)


returns an error.



Thank you in advance.

Answer

This question has been asked with reference to other statistical packages such as SAS https://communities.sas.com/thread/47675 and Stata http://www.stata.com/statalist/archive/2005-08/msg00018.html and the common answer has been to use pooled model to get VIF. The logic is that since multicollinearity is only about independent variable there is no need to control for individual effects using panel methods.