I have scores of data sets ready for meta-analyses.  I would like to run them 
as separate meta-analyses because otherwise I will be mixing apples with 
oranges.  In the code below, I successfully run a single meta-analysis with a 
moderator.

metacor(rho,N,Study,data=Leadership,comb.fixed=F,prediction=T,byvar=Leadership$Moderator)

To test my idea, I used the variable Moderator to try to produce separate meta 
analyses with either by or tapply, to no avail.  The closest I got to what I 
need is the code below.  It does produce separate output for each level of 
Moderator, but it just replicate the results without separating the data.  That 
is, I have k=13, and I just get the same k=13 meta-analysis for each level of 
Moderator.


attach(Leadership)
f<-metacor(rho,N,Study,comb.fixed=F,prediction=T)
by(Leadership,Moderator,function(x) f)

Yours,

Avi Kluger<http://pluto.huji.ac.il/~mskluger/kluger.html>


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to