I'm having a strange problem running a meta-regression using the function rma.mv()
in the 'metafor' package in R.
Since some of my data are from multiple-endpoint studies, I have calculated the variance-covariance matrix so that correlations between outcomes are taken into account. I'm also using random effects at study and treatment level. As far as I'm aware, I have now covered all issues with regard to dependent effect sizes.
The model looks like this:
cov_mod <- rma.mv(Hedges_g, cov, mods = ~ days, random = ~ treatment | study, data = rev)
When running the code, it gives this error message:
Error in rma.mv(Hedges_g, cov9, mods = ~days, random = ~1 | treatment/study, :
Error during optimization.
In addition: Warning message:
In rma.mv(Hedges_g, cov9, mods = ~days, random = ~1 | treatment/study, :
V appears to be not positive definite.
I have discovered that the problem lies with one particular study (9 effect sizes in total, coming from 3 treatment groups that were each tested at 3 moments in time). When I remove this study from the data set, the code runs without problem.
Thus, apparently this particular study causes the matrix to be 'not positive definite'. I have read that this likely means that "at least one of [the] variables can be expressed as a linear combination of the others" (source).
However, here comes the strange thing: I have replaced all values in the variance-covariance matrix relating to this particular study with random numbers between 0-1 (maintaining the symmetry), and the error message remains unchanged. I am puzzled, because the matrix can no longer be linearly predictable if it contains random numbers.
What could be the issue?