Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vif

Variance Inflation Factors for 'rma' Objects


Description

Compute variance inflation factors (VIFs) for objects of class "rma".

Usage

vif(x, ...)

## S3 method for class 'rma'
vif(x, intercept=FALSE, table=FALSE, digits, ...)

Arguments

x

an object of class "rma".

intercept

logical indicating whether to include the intercept (if the model includes one) in the computation of the VIFs (the default is FALSE). See ‘Note’.

table

logical indicating whether the VIFs should be added to the model coefficient table (the default is FALSE).

digits

integer specifying the number of decimal places to which the printed results should be rounded (if unspecified, the default is to take the value from the object).

...

other arguments.

Details

The function computes variance inflation factors (VIFs) for meta-regression models. Hence, the model specified via x must include moderator variables. VIFs indicate the inflation in the variance of a model coefficient due to collinearity among the predictor variables.

Value

Either a vector (if table=FALSE) with the VIFs or a data frame (if table=TRUE) with the following elements:

estimate

estimated model coefficients.

se

corresponding standard errors.

zval

corresponding test statistics.

pval

corresponding p-values.

ci.lb

corresponding lower bound of the confidence intervals.

ci.ub

corresponding upper bound of the confidence intervals.

vif

corresponding variance inflation factors.

Note

The values of the VIFs are invariant to the scaling of the predictor variables if the model includes an intercept that is removed when inverting the correlation matrix of the model coefficients to compute the VIFs. This is the default behavior. See ‘Examples’.

Author(s)

References

Davis, C. E., Hyde, J. E., Bangdiwala, S. I., & Nelson, J. J. (1986). An example of dependencies among variables in a conditional logistic regression. In S. H. Moolgavkar & R. L. Prentice (Eds.), Modern statistical methods in chronic disease epidemiology (pp. 140–147). New York: Wiley.

Wax, Y. (1992). Collinearity diagnosis for a relative risk regression-analysis: An application to assessment of diet cancer relationship in epidemiologic studies. Statistics in Medicine, 11, 1273–1287.

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1–48. https://www.jstatsoft.org/v036/i03.

See Also

Examples

### copy data from Bangert-Drowns et al. (2004) into 'dat'
dat <- dat.bangertdrowns2004

### fit mixed-effects meta-regression model
res <- rma(yi, vi, mods = ~ length + wic + feedback + info + pers + imag + meta, data=dat)

### get variance inflation factors
vif(res)

### show that VIFs are not influenced by scaling of the predictors
u <- scale # to standardize the predictors
res <- rma(yi, vi, mods = ~ u(length) + u(wic) + u(feedback) + u(info) +
                            u(pers) + u(imag) + u(meta), data=dat)
vif(res)

### get full table
vif(res, table=TRUE)

metafor

Meta-Analysis Package for R

v2.4-0
GPL (>= 2)
Authors
Wolfgang Viechtbauer [aut, cre] (<https://orcid.org/0000-0003-3463-4063>)
Initial release
2020-03-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.