I am running a panel data regression using the package plm
in R
and want to control the multi-collinearity between the explanatory variables.
I know that car
there is a function in the package vif()
, however, as far as I know, it cannot handle the output of panel data.
plm
can perform other diagnostic operations, such as a single root test, but I have not found a method for calculating multicollinearity.
Is there a way to calculate a similar test for vif
, or can I just treat each variable as a time series, leaving the panel information and running the tests using the package car
?
I canβt disclose the data, but the problem should be relevant for all panel data models.
The dimension is approximately 1000 observations, more than 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.
source
share