Description Usage Arguments Details Value References Examples
View source: R/multicollinearity.R
Calculation of the Variance Inflation Factor for each column in the design matrix.
1 | VIF(X)
|
X |
Data.Frame |
In order to discover multicollinearities between the independent variables of a model, the Variance Inflation Factor (VIF) serves as a tool. Variance Inflation Factors: The variance inflation factor (VIF) is the quotient of the variance in a model with several terms and the variance of a model with only one term. It quantifies the severity of multicollinearity in an ordinary regression analysis with smallest squares. It provides an index that measures how much the variance (the square of the standard deviation of the estimate) of an estimated regression coefficient is increased due to collinearity. The basic idea is to try to express a particular variable xk through a linear model of all other independent variables. If this succeeds well (i.e. if the coefficient of determination is high), one can assume that the tested variable xk is (multi)collinear to one or more variables. In general, you calculate the VIF for all independent variables and then try to remove the variables with the highest values from the model. As a rule of thumb, in a linear model the VIF values of the independent variables should be less than 10 to avoid problems with the interpretability of the coefficients. Mathematically, the VIF measures the increase in variance compared to an orthogonal base (Lohninger 2012).
Returns a vector with the Variance Inflation Factors.
Lohninger, H. 2012. Grundlagen der Statistik
1 2 3 4 5 | ## Not run:
X <- data.frame(matrix(rnorm(200), ncol = 5))
olsdiagnosticR:::VIF(X = X)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.