metafor (version 2.4-0)

vif: Variance Inflation Factors for 'rma' Objects

Description

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

Usage

vif(x, …)

# S3 method for 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.

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.

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.

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

rma.uni, rma.mv, rma.glmm

Examples

Run this code
# NOT RUN {
### 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)
# }

Run the code above in your browser using DataCamp Workspace