Skip to content
Prev 315731 / 398502 Next

dummy encoding in metafor

As Michael already mentioned, the error:

Error in qr.solve(wX, diag(k)) : singular matrix 'a' in solve

indeed indicates that your design matrix is not of full rank (i.e., there are linear dependencies among your predictors). With this many factors in the same model, this is not surprising if k is "only" 94 (which is actually quite large for a meta-analysis). One options is to leave out some of the predictors. You can also try collapsing some of the levels of the factors. Of course, you lose some "details" that way, but apparently you don't have enough data in the first place to carry out such a detailed analysis.
One other thing I noticed. You wrote:
rma(yi=Mean, vi=Variance, ni=N.1, ...)

I suspect that your variable "Variance" is actually the variance of the raw scores. However, the vi argument is used to pass the sampling variances of the yi values to the function -- not the variance of raw scores. The (estimated) sampling variance of a mean is s^2 / n, so if I am not mistaken, you really want to use:

rma(yi=Mean, vi=Variance/N.1, ...)

Best,
Wolfgang

--   
Wolfgang Viechtbauer, Ph.D., Statistician   
Department of Psychiatry and Psychology   
School for Mental Health and Neuroscience   
Faculty of Health, Medicine, and Life Sciences   
Maastricht University, P.O. Box 616 (VIJV1)   
6200 MD Maastricht, The Netherlands   
+31 (43) 388-4170 | http://www.wvbauer.com