# 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 DataLab