[R] converting proc mixed to lme for a random effects meta-analysis
Bernd Weiss
bernd.weiss at uni-koeln.de
Tue Jun 19 14:36:47 CEST 2007
On 19 Jun 2007 at 8:13, Lucia Costanzo wrote:
Date sent: Tue, 19 Jun 2007 08:13:30 -0400
From: Lucia Costanzo <lcostanz at uoguelph.ca>
To: r-help at stat.math.ethz.ch
Subject: [R] converting proc mixed to lme for a random
effects meta-analysis
> I would like to convert the following SAS code for a Random Effects
> meta-analysis model for use in R but, I am running into
> difficulties.
> The results are not similar, R should be reporting 0.017 for the
> between-study variance component, 0.478 for the estimated parameter
> and
> 0.130 for the standard error of the estimated parameter. I think it
> is
> the weighting causing problems. Would anyone have any suggestions or
> tips?
>
> Thank you,
> Lucia
>
> *** R CODE ***
> studynum <-c(1, 2, 3, 4, 5)
> y <-c(0.284, 0.224, 0.360, 0.785, 0.492)
> w <-c(14.63, 17.02, 9.08, 33.03, 5.63)
> genData2 <-data.frame(cbind(studynum, y, w,v))
>
> re.teo<-lme(y~1, data=genData2, random =~1, method="ML",
> weights=varFixed(~w))
>
>
What about using MiMa <http://www.wvbauer.com/downloads.html>?
studynum <-c(1, 2, 3, 4, 5)
y <-c(0.284, 0.224, 0.360, 0.785, 0.492)
w <-c(14.63, 17.02, 9.08, 33.03, 5.63)
## without cbind(...)
genData2 <-data.frame(studynum, y, w)
mima(genData2$y, 1/genData2$w, mods = c(), method = "ML")
Some output:
- Estimate of (Residual) Heterogeneity: 0.0173
- estimate SE zval pval CI_L CI_U
intrcpt 0.4779 0.1304 3.6657 2e-04 0.2224 0.7334
Looks like what you are looking for...
HTH,
Bernd
More information about the R-help
mailing list