[R] metafor
Jin Choi
oohpsjin at gmail.com
Sat May 5 19:03:57 CEST 2012
Dear users of metafor,
I am working on a meta-analysis using the metafor package. I have a
excel csv database that I am working with. I am interested in pooling
the effect measures for a particular subgroup (European women) in this
csv database. I am conducting both sub-group and meta-regression.
In subgroup-analyses, I have stratified the database to create a
separate csv file just for European women from the original database
and conducted the following:
women_west<-read.csv("women_west.csv")
print(women_west)
dat<-escalc(measure="ZCOR",ri=Pearson,ni=N,data=women_west,append=TRUE)
res<-rma(yi,vi,data=dat)
is.factor(dat$year)
forest(res,transf=transf.ztor)
In meta-regression, I used the original database, but used categorical
moderators for sex (=women), and ethnicity (=european) to find the
effect specifically in European women.
adult<-read.csv("adult.csv")
print(adult)
dat<-escalc(measure="ZCOR",ri=Pearson,ni=N,data=adult,append=TRUE)
res<-rma(yi,vi,data=dat)
res<-rma(yi,vi,mods=cbind(sex,race),data=dat)
predict(res,transf=transf.ztor,newmods=cbind(seq(from=0,to=1,by=1),1),addx=TRUE)
I am getting different results between the forest function from
subgroup analyses, and the predict function from the meta-regression.
I thought they should have been the same - can I get help to explain
why there are differences? In both cases, I am transforming raw
Pearson coefficients to z-transformed coefficients, then
back-transforming to raw r after pooling.
Thank you very much.
Jin Choi
MSc (Epidemiology) Student
McGill University, Montreal CANADA
More information about the R-help
mailing list