Written and maintained by CASRAI Editorial Board
Last updated
The variance inflation factor (VIF) in R comes from one of three CRAN packages: car::vif() for fitted lm and glm models, performance::check_collinearity() for a table with confidence intervals and tolerance, and usdm::vifstep() for dropping variables one at a time. This guide shows how to run each, how to read the GVIF columns that appear when a model has factor predictors, and where the packages disagree about thresholds. For the concept itself, see multicollinearity and VIF in regression and the variance inflation factor explained.
What VIF in R is used for in research
A VIF is computed for each predictor in a regression model and shows how much the predictor’s coefficient variance is inflated by correlation with the other predictors. Researchers run it after fitting a model, before interpreting individual coefficients, and again after removing or combining variables. The VIF depends only on the predictors, not on the outcome variable. Every package below works from that same idea; they differ in the model classes they accept and in what they print.
Install or access the VIF packages in R
All three packages are free and distributed through CRAN, so a single call to install.packages() is enough. This answers the common search for a “vif r package” or “vif in r package”: there is no single one, and the choice depends on the job (see the table further down).
install.packages(c("car", "performance", "usdm"))
Reference pages: the car::vif manual, the performance::check_collinearity reference and the usdm vif, vifcor and vifstep manual.
How to run vif() in R
Step 1: fit the model
Fit the regression you want to check. The names below are placeholders for your own data frame and variables.
model <- lm(outcome ~ age + dose + group, data = trial)
Step 2: call car::vif()
library(car)
vif(model)
The car documentation lists the usage as vif(mod, ...), with S3 methods for lm (which accepts type = c("terms", "predictor")), for merMod, polr and svyolr objects, and a default method that needs the model’s coef, vcov and model.matrix methods to work, which covers a glm fit. If every term in the model has one degree of freedom, the result is a named vector of ordinary VIFs. If any term has more than one degree of freedom, the result is a matrix of generalized VIFs (GVIFs).
Step 3: get a fuller table with performance
library(performance)
check_collinearity(model)
The function is check_collinearity(x, ci = 0.95, verbose = TRUE, ...) and multicollinearity() is an alias. Its table has the columns Term, VIF, VIF 95% CI, adj. VIF, Tolerance (equal to 1/VIF) and Tolerance 95% CI.
Step 4: screen a whole set of variables with usdm
library(usdm)
vifstep(predictors_df, th = 10)
Here predictors_df stands for a data frame containing only the candidate predictors. The usdm manual gives vifstep(x, th = 10, keep = NULL, size, method = 'pearson', ...) and vifcor(x, th = 0.9, keep = NULL, size, method = 'pearson'); the plain vif(x, size, ...) in that package reports VIFs for a set of variables.
Reading GVIF output for factors
When a model contains a factor with three or more levels, that term uses several coefficients, and car::vif() returns a matrix instead of a vector. The shape looks like this (values omitted because they depend on your data):
GVIF Df GVIF^(1/(2*Df))
age ... 1 ...
dose ... 1 ...
group ... 2 ...
How to read it, per the car manual:
- GVIF is the generalized VIF of Fox and Monette (1992), used when a term has more than one degree of freedom.
- Df is the number of degrees of freedom of the term, so a continuous predictor shows 1.
- GVIF^(1/(2*Df)) adjusts for the dimension of the term’s confidence ellipsoid. This is the column to compare across terms, because raw GVIFs of terms with different Df are not on the same footing.
- GVIFs do not depend on how a term is coded, provided the column subspace is unchanged.
The performance package reports a related quantity called “adj. VIF”: the factor by which the standard error is increased because of possible correlation with other terms, which equals the square root of the VIF for terms with a single coefficient.
VIF thresholds in R packages
The packages do not agree on a single cut-off.
performancelabels a VIF below 5 as low, 5 to 10 as moderate and above 10 as high (“not tolerable”). It notes that these thresholds come from James et al. (2013) and have been criticised as too high, and that Zuur et al. (2010) suggest a VIF of 3 or more may already not be low.usdmstates that a VIF greater than 10 is a signal of a collinearity problem, and uses 10 as the default threshold invifstep().
Treat any single number as a prompt to look at the model, not as a pass-fail test. State in your methods section which threshold you used and which package produced it.
Dropping variables with vifstep
The usdm manual describes the procedure: vifstep() finds the variable with the highest VIF, drops it if that VIF exceeds th, and repeats until no remaining variable exceeds the threshold. vifcor() works on pairs instead: for each pair with a correlation above th it drops the variable with the greater VIF. Use keep to protect variables you must retain. For large inputs, size defaults to 5000 and a random sample of that size is used when the data are larger.
Automatic dropping is a screening step. Whether a variable is scientifically needed in the model is a decision for the analyst; if two measures capture one construct, you may prefer to combine them. See regression analysis for how predictor choice fits into model building.
Troubleshooting VIF in R
- Interaction terms. The
carmanual says the defaulttype = "terms"ignores marginality in models with interactions and that such VIFs are generally not sensible. The alternativetype = "predictor"groups a predictor with its main effect and interactions, and is marked experimental in the documentation. - Models without an intercept. VIFs and GVIFs for linear-type models without an intercept are generally not sensible, per the same manual.
- Exactly redundant predictors. If one predictor is an exact linear combination of others, the problem is structural rather than a matter of degree; see perfect multicollinearity and remove the redundant term before computing VIFs.
- Mixed models and ordinal models. Use the
merModorpolrmethods incar; for random-effects background see mixed-effects models. - Logistic regression. The default method covers
glmfits, so the call is the same as forlm; see logistic regression in R for fitting the model.
Free alternatives: the three VIF packages compared
| Package | Main function | Works on | What it returns | Use it for |
|---|---|---|---|---|
| car | vif(mod) |
Fitted lm, merMod, polr, svyolr; default method for models such as glm |
A vector of VIFs, or a matrix with GVIF, Df and GVIF^(1/(2*Df)) | Checking one fitted model, including factor terms |
| performance | check_collinearity(x) |
A fitted model | Table with VIF, 95% CI, adj. VIF, tolerance and its CI | Reporting VIF with intervals and tolerance |
| usdm | vifstep(x, th), vifcor(x, th), vif(x) |
A set of variables | VIFs, and the variables kept after iterative exclusion | Screening many candidate predictors |
All three are free CRAN packages. The packages answer different questions, so running car::vif() on the final model and usdm::vifstep() during variable selection are not competing choices.
FAQ
Which R package should I use for VIF?
Use car if you have a fitted model and want the standard VIF or GVIF output, performance if you want confidence intervals and tolerance in one table, and usdm if you want to screen a set of variables before modelling.
What does the vif r package output mean for a factor variable?
A factor with more than two levels gets a GVIF with its Df. Compare the GVIF^(1/(2*Df)) column across terms, since it adjusts for the dimension of each term.
Can I run vif in R on a logistic regression?
Yes. The car default method needs the model’s coef, vcov and model.matrix methods, which a glm object provides.
What is a good VIF value?
Sources differ. The performance documentation uses below 5 as low, 5 to 10 as moderate and above 10 as high, while noting that a VIF of 3 or more may already not be low. The usdm manual treats a VIF above 10 as a signal of a collinearity problem.
Does the VIF depend on the outcome variable?
No. It is computed from the predictors only, so the same predictors give the same VIFs whatever outcome you model.
Sources
- Fox, J. and Weisberg, S.,
car::vifreference manual, CRAN documentation, search.r-project.org/CRAN/refmans/car/html/vif.html (checked 2026-10-29). Cites Fox and Monette (1992), JASA 87:178-183, and Fox and Weisberg (2018), An R Companion to Applied Regression, 3rd ed. - easystats,
performance::check_collinearityreference, easystats.github.io/performance/reference/check_collinearity.html (checked 2026-10-29). - usdm package,
vif,vifcor,vifstepmanual, CRAN documentation, search.r-project.org/CRAN/refmans/usdm/html/vif.html (checked 2026-10-29).







