[R-meta] Condition to make variance-covariance matrix invertible with "rma.mv"

Viechtbauer, Wolfgang (SP) wolfg@ng@viechtb@uer @ending from m@@@trichtuniver@ity@nl
Wed Nov 14 16:49:56 CET 2018


Dear Federico,

Trying to run your code, but:

> V <- bldiag(V)
Error in bldiag(V) : object 'V' not found

Also, you provide 'BOD', but later you use 'data=effcovmatrix'.

Please supply a fully reproducible and working example.

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On Behalf Of Federico Tedeschi
Sent: Monday, 12 November, 2018 14:09
To: 'r-sig-meta-analysis using r-project.org'
Subject: [R-meta] Condition to make variance-covariance matrix invertible with "rma.mv"

Dear all,

I'd like to understand how I can further investigate on the error message "Error in eigen(V, symmetric = TRUE, only.values = TRUE) : infinite or missing values in 'x' " with the "rma.mv" command.

In my case, I have realized that my problem is that the estimated between-study (BS) covariance is not positive definite. However, I've noticed that even by forcing the BS covariance matrix to be diagonal the model doesn't run. These are my data:

BOD <- structure(list(eff = c(-.109,.007,-.132,-.090,-.103,-.002,-.017,-.103,.075,-.074,-.222,-.004), group = c(1,2,1,2,1,2,1,2,1,2,1,2), v1i=c(0.003844,-0.0002555,0.005184,-0.000274,0.000784,-0.000052,0.002401,-0.000203,0.001156,-0.000186,0.009801,-0.0000405), v2i=c(-0.0002555,0.001156,-0.000274,0.001764,-0.000052,0.000049,-0.000203,0.001369,-0.000186,0.000441,-0.0000405,0.000081),outcome=c("dir","ind","dir","ind","dir","ind","dir","ind","dir","ind","dir","ind"), class = "data.frame"))

and these are the commands I run:

library(metafor)
V <- bldiag(V)
res <- rma.mv(eff, V, mods = ~ outcome - 1, random = ~ outcome | group, struct="DIAG", data=effcovmatrix, method="ML")
res <- rma.mv(eff, V, mods = ~ outcome - 1, random = ~ outcome | group, struct="DIAG", data=effcovmatrix, method="REML")

Both the ML and the REML methods lead to the same error message as above. I don't understand why the problem occurs even when I fix the BS covariance to 0: in such case, my understanding is that the variances of the effects should even be inflated (with non-positive-definiteness due to an implied correlation below -1, fixing the correlation to any admittable value leads to a lower covariance, thing that is compensated by inflating variances).
Is it because a first estimation of the BS covariance matrix is performed before the "structure" command is considered? Is there a way to overcome this problem?



More information about the R-sig-meta-analysis mailing list