[R] converting proc mixed to lme for a random effectsmeta-analysis
Viechtbauer Wolfgang (STAT)
Wolfgang.Viechtbauer at STAT.unimaas.nl
Tue Jun 19 14:52:03 CEST 2007
That was going to be my suggestion =)
By the way, lme does not give you the right results because the residual variance is not constrained to 1 (and it is not possible to do so).
Best,
--
Wolfgang Viechtbauer
Department of Methodology and Statistics
University of Maastricht, The Netherlands
http://www.wvbauer.com/
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Bernd Weiss
Sent: Tuesday, June 19, 2007 14:37
To: Lucia Costanzo
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] converting proc mixed to lme for a random effectsmeta-analysis
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
______________________________________________
R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list