Skip to content

converting proc mixed to lme for a random effects meta-analysis

2 messages · Lucia Costanzo, Bernd Weiss

#
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;
#
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
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