[R] converting proc mixed to lme for a random effects meta-analysis
Lucia Costanzo
lcostanz at uoguelph.ca
Tue Jun 19 14:13:30 CEST 2007
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))
*** SAS CODE ***
data tacrine;
input study y w;
cards;
1 0.284 14.63
2 0.224 17.02
3 0.360 9.08
4 0.785 33.03
5 0.492 5.63
;
run;
*Random Effects using log-odds for tacrine example table 4.29;
DATA remlma;
SET tacrine;
var=1/w;
col = _n_;
row = _n_;
value = var;
run;
*random effects for tacrine example;
PROC MIXED data = remlma method=reml order=data;
CLASS study;
MODEL y = / solution;
RANDOM study / gdata = remlma;
REPEATED diag;
RUN;
More information about the R-help
mailing list