rvif_package
This repository has been created to control the rvif package. This package is focused on determining whether or not the degree of approximate multicollinearity in a multiple linear regression model is of concern, meaning that it affects the statistical analysis (i.e. individual significance tests) of the model.
This package uses functions from the multiColl package.
Historical
Previous versions: 1.0 and 3.0
Version 1:
Contains the functions "CV_VIF.R" and "RVIF.R"
Changes from version 1.0 to 2.0:
The function "Theorem.R" and data sets are added.
Changes from version 2.0 to 3.0:
Function names and arguments have been renamed and revised to improve usability. This package website has been added for easier access to documentation. A dedicated package homepage has been created, unit tests have been implemented for all functions and a vignette has been included to guide users in applying the package.
Changes from version 3.0 to 3.1:
Errors detected in the tests have been corrected.
Changes from version 3.1 to 3.2:
cv_vif_plot() has been replaced with an S3 method plot.cv_vif().
Current version: 3.2
Instalation
You can install the stable version from CRAN (recommended):
> install.packages("rvif", dependencies = TRUE)
You can install the development version from Github:
> install.packages("remotes")
>
> remotes::install_github("rnoremlas/rvif")
Data
This package has the following datasets available:
-
euribor: Data used in Example 1 of Salmerón, García and García (2025) (subsection 4.1) on Euribor data.
-
CDpf: Data used in Example 2 of Salmerón, García and García (2025) (subsection 4.2) on data for the Cobb-Douglas production function.
-
employees: Data used in Example 3 of Salmerón, García and García (2025) (subsection 4.3) on the number of employees of Spanish companies.
-
SLM1: First data used in Example 4 of Salmerón, García and García (2025) (subsection 4.4) on the special case of the simple linear model.
-
SLM2: Second data used in Example 4 of Salmerón, García and García (2025) (subsection 4.4) on the special case of the simple linear model.
-
soil: Data used in Bondell and Reich's paper (https://doi.org/10.1111/j.1541-0420.2007.00843.x) on soil characteristics used as predictors of forest diversity.
-
Wissel: Wissel data on outstanding mortgage debt (https://opus.bibliothek.uni-wuerzburg.de/opus4-wuerzburg/frontdoor/deliver/index/docId/2949/file/wissel.pdf).
-
KG: Klein and Goldberger data on consumption and wage income.
-
theil: Henri Theil's textile consumption data modified.
Usage
> library(rvif)
>
>
> x = euribor[, -1]
>
> cv_vif(x)
>
> plot(cv_vif(x))
> abline(h=10, col="red", lwd=3, lty=2)
> abline(h=0, col="black", lwd=1)
> abline(v=0.1002506, col="red", lwd=3, lty=3)
>
>
> rvifs(x)
>
>
> y = euribor[, 1]
>
> multicollinearity(y, x)
>
> multicollinearity(y, x, alpha = 0.01)
For more information
- CRAN: Package rvif, https://CRAN.R-project.org/package=rvif.
- CRAN: Package multiColl, https://CRAN.R-project.org/package=multiColl.
- Salmerón R., García C.B. and García J. (2018). Variance Inflation Factor and Condition Number in multiple linear regression. Journal of Statistical Computation and Simulation, 88 (12), 2365-2384, <doi: 10.1080/00949655.2018.1463376>.
- Salmerón, R., Rodríguez, A. and García C. (2020). Diagnosis and quantification of the non-essential collinearity. Computational Statistics, 35, 647-666, <doi: 10.1007/s00180-019-00922-x>.
- Salmerón, R., García, C.B, Rodríguez, A. and García, C. (2022). Limitations in detecting multicollinearity due to scaling issues in the mcvis package. The R Journal, 14 (4), 264-279, <doi: 10.32614/RJ-2023-010>.
- Salmerón, R., García, C.B. and García, J. (2025). A Redefined Variance Inflation Factor: overcoming the limitations of the Variance Inflation Factor. Computational Economics, 65, 337-363, <doi: 10.1007/s10614-024-10575-8>.
- Salmerón, R., García, C.B, García J. (2023, working paper). Overcoming the inconsistences of the variance inflation factor: a redefined VIF and a test to detect statistical troubling multicollinearity. ArXiv, <doi: 10.48550/arXiv.2005.02245>.
- The package vignette using 'browseVignettes("rvif")'.
- The package website using 'browseURL(system.file("docs/index.html", package = "rvif"))' or https://www.ugr.es/~romansg/rvif/index.html.
License
This package is free and open source software, licensed under GPL-3.