Skip to content

dummy encoding in metafor

12 messages · Viechtbauer Wolfgang (STAT), Michael Dewey, Alma Wilflinger

#
At 17:14 19/01/2013, Alma Wilflinger wrote:
Alma, although you can generate your own dummy variables by hand you 
do not have to as R will do it for you. See below for more comments.
If you look a bit further down the manual page you will see
### using a model formula to specify the same model
rma(yi, vi, mods=~factor(alloc)+year+ablat, data=dat, method="REML", 
btt=c(2,3))

which is much easier.
If you code them yourself R does not know. You know.
You say you have seven moderator variables. Unless you have a shed 
load of studies you will not be able to look at them simultaneously. 
Apologies if you already knew that.
Michael Dewey
info at aghmed.fsnet.co.uk
http://www.aghmed.fsnet.co.uk/home.html
#
At 14:48 20/01/2013, Alma Wilflinger wrote:
I suspect that you have a linear dependence between your moderator 
variables. Depending on how many levels there are for country, 
sample, and so on you do have a lot of predictors (you presumably 
know that a factor counts as levels-1 for this purpose?)
You perhaps would benefit from rereading some of the introductory 
material about formulas. Also look for anything about the model 
matrix (also called the design matrix)
The truthful but perhaps unhelpful answer is that you need to collect 
more data or use fewer moderators.
Michael Dewey
info at aghmed.fsnet.co.uk
http://www.aghmed.fsnet.co.uk/home.html
#
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
1 day later
#
At 08:30 23/01/2013, Alma Wilflinger wrote:
It seems unlikely to me that the variance from each study would be 
the same although I suppose it could be possible. Are you sure you 
are supplying the right values to CMA?
Michael Dewey
info at aghmed.fsnet.co.uk
http://www.aghmed.fsnet.co.uk/home.html
#
At 22:06 23/01/2013, Alma Wilflinger wrote:

            
Alma
There is a fairly comprehensive list of all the things which might be 
an effect size on
http://en.wikipedia.org/wiki/Effect_size
Is what you call Mean one of them?
Michael Dewey
info at aghmed.fsnet.co.uk
http://www.aghmed.fsnet.co.uk/home.html
3 days later
#
Dear Alma,

either there is a whole lot of miscommunicaton here, or you (and your supervisor) are way in over your head.

You say that you are working with Cohen's d values. And you mentioned CMA. So, let me ask you some questions:

1) Has CMA computed those d values for you?
2) If yes, what information did you supply to CMA for the computation of those d values? (means, standard deviations, and the sample sizes of the two groups?)
3) Did CMA then provide you with a column of values that are the corresponding sampling variances or standard errors? (those values should NOT all be equal to 1!)

Best,
Wolfgang