I want to check the multicolinearity of variables in my lm model using vif().
It is throwing error and hence I am not able to use:
> library(car)
Error in library(car) : there is no package called ‘car’
> vif(mymodel3)
Error in vif(mymodel3) : could not find function "vif"
I have tried to install 'car' package many times. It gives some warnings like below:
> install.packages("car",dependencies = TRUE)
Installing package into ‘C:/Users/HP/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘pbkrtest’ is not available
There is a binary version available but the source version is later:
binary source needs_compilation
car 3.0-7 3.0-8 FALSE
installing the source package ‘car’
trying URL 'https://cran.rstudio.com/src/contrib/car_3.0-8.tar.gz'
Content type 'application/x-gzip' length 499932 bytes (488 KB)
downloaded 488 KB
ERROR: dependency 'pbkrtest' is not available for package 'car'
* removing 'C:/Users/HP/Documents/R/win-library/3.5/car'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\HP\AppData\Local\Temp\Rtmpw3noJW\downloaded_packages’
kindly suggest how to fix this issue with car package in R.
Also, please suggest if there is any alternative function other than using vif()
that can be used in R Studio for multicolinearity of variables in my lm model.