[R-meta] Variance inflation factors (VIF) calculations applicable to a rma.mv model
Viechtbauer, Wolfgang (SP)
wolfg@ng@viechtb@uer @ending from m@@@trichtuniver@ity@nl
Thu May 31 22:10:36 CEST 2018
Hi Roger,
I do not know what the theoretical reasoning is behind the vif.mer() function, but the same computations can be easily done with 'rma.mv' objects.
v <- vcov(model19)
v <- v[-1,-1] # remove the row/column corresponding to the intercept
d <- diag(v)^0.5
v <- diag(solve(v/(d %o% d)))
v
I did a bit of searching and this appears to be based on the vif() function in the 'rms' package. It states that this "Computes variance inflation factors from the covariance matrix of parameter estimates, using the method of Davis et al. (1986), which is based on the correlation matrix from the information matrix." The reference for this is:
Davis CE, Hyde JE, Bangdiwala SI, Nelson JJ: An example of dependencies among variables in a conditional logistic regression. In Modern Statistical Methods in Chronic Disease Epidemiology, Eds SH Moolgavkar and RL Prentice, pp. 140–147. New York: Wiley; 1986.
I do not have this book, so I cannot look up what the logic is behind this method. But computing it is easy.
Best,
Wolfgang
-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On Behalf Of Martineau, Roger
Sent: Thursday, 31 May, 2018 21:31
To: r-sig-meta-analysis using r-project.org
Subject: [R-meta] Variance inflation factors (VIF) calculations applicable to a rma.mv model
Dear list members,
I have the following multilevel model. I want to calculate variance inflation factors (VIF) among Xs to test collinearity.
Does someone know how to get VIF from a rma.mv model ?
> model19 <- rma.mv(MPY, SEM^2, data=dataset,
+ mods = ~
+ X1 +
+ X2 +
+ X3 +
+ X4 +
+ X5,
+ random = ~ 1|experiment/study/ID,
+ method = "REML", digits=4)
> robust(model19, cluster= dataset$experiment)
I have this VIF function that I can use for a lmer model (see below) but it doesn’t work for the rma.mv model.
# VIF for lmer model
vif.mer <- function (fit) {
v <- vcov(fit)
nam <- names(fixef(fit))
ns <- sum(1 * (nam == "Intercept" | nam == "(Intercept)"))
if (ns > 0) {
v <- v[-(1:ns), -(1:ns), drop = FALSE]
nam <- nam[-(1:ns)]
}
d <- diag(v)^0.5
v <- diag(solve(v/(d %o% d)))
names(v) <- nam
v
}
Best,
Roger ☺
Roger Martineau, mv Ph.D.
Centre de recherche et de développement
sur le bovin laitier et le porc
Agriculture et agroalimentaire Canada/Agriculture and Agri-Food Canada
Téléphone/Telephone: 819-780-7319
Télécopieur/Facsimile: 819-564-5507
2000, Rue Collège / 2000, College Street
Sherbrooke (Québec) J1M 0C8
Canada
roger.martineau using agr.gc.ca<mailto:roger.martineau using agr.gc.ca>
More information about the R-sig-meta-analysis
mailing list