The multicollinearity problem is addressed using the `vif`

function, which is available from two libraries: `car`

and `faraway`

. We will use it from the `faraway`

package.

- Load the
`faraway`

package with`library(faraway)`

. - We need to find the
**variance inflation factor**(**VIF**) of the independent variables only. The covariate*X*is a character variable, and the first column of the Gasoline dataset is the regressand. Hence, run_{11}`vif(Gasoline[,-c(1,12)])`

to find the VIF of the eligible independent variables. - The VIF for
*x*is highest at_{3}*217.587*. Hence, we remove it to find the VIF among the remaining variables with`vif(Gasoline[,-c(1,4,12)])`

. Remember that*x*is the fourth column in ..._{3}

Start Free Trial

No credit card required