[R-meta] Non-positive definite variance-covariance matrix

E. van der Meulen E@vdrMeu|en_1 @end|ng |rom uvt@n|
Sun Aug 18 19:41:55 CEST 2019


Dear all,

I am trying to run a multivariate meta-analysis for a review. For this review I included multiple effect sizes from single studies into my analysis. The number of effect sizes from a single study range from 1 to 36. To account for covariance between effect sizes extracted from the same sample, I created a variance-covariance matrix for each study with multiple effect sizes (which is the majority). I am using a syntax I have used before, in the previous attempt it worked perfectly. However, in this new study I am continuously ending up with the same error message:

Error in .ll.rma.mv(opt.res$par, reml = reml, Y = Y, M = V, A = A, X.fit = X,  :
  Final variance-covariance matrix not positive definite.
In addition: Warning message:
In rma.mv(dat$ESP, V, mods = ~1, random = list(~1 | id/nummer),  :
  'V' appears to be not positive definite.

In which V is the variance-covariance matrix I made. As far as I know an error due to 'non-positive definite matrices' can occur in cases in which negative or exactly zero eigenvalues appear anywhere in any of the matrices. As far as I can determine this is not the case. What could be the problem? If it helps this is full the syntax:


library(metafor) # For meta-analysis
library(clubSandwich) # For cluster-robust variance-covariance matrix
library(foreign)

dat<- read.spss("TEST.sav", to.data.frame= TRUE)

list_mat<- split(dat[ ,c("v1p", "v2p", "v3p", "v4p", "v5p", "v6p")], dat$id)

remove_zero<- lapply(list_mat, function(x) x[ ,colSums(x) != 0])

remove_zero_mat<- sapply(remove_zero, as.matrix)

V<- bldiag(remove_zero_mat)

PTSD<- rma.mv(dat$ESP, V, mods= ~ 1, random= list(~ 1| id/nummer), data=dat)

summary (PTSD,digits=3)

In which:
V = the covariance-variance matrices
ESP = the effect size
v1p to v6p = dimensions of the variance-covariance matrices

Thanks in advance.

Kind regards,

Erik van der Meulen





	[[alternative HTML version deleted]]



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