Dear Angelo, This is (currently) not possible.
Best, -- Wolfgang Viechtbauer http://www.wvbauer.com/ Department of Methodology and Statistics Tel: +31 (0)43 388-2277 School for Public Health and Primary Care Office Location: Maastricht University, P.O. Box 616 Room B2.01 (second floor) 6200 MD Maastricht, The Netherlands Debyeplein 1 (Randwyck) ----Original Message---- From: Angelo Franchini [mailto:angelo.franch...@bristol.ac.uk] Sent: Sunday, August 08, 2010 13:09 To: Viechtbauer Wolfgang (STAT) Cc: r-help@r-project.org Subject: RE: [R] metafor and meta-analysis at arm-level > Dear Wolfgang, > > Is there any way for rma to add random effects only to each treatment > arm, but not to the control one? > > Many thanks, > Angelo > > > On Thu, August 5, 2010 6:21 pm, Viechtbauer Wolfgang (STAT) wrote: >> Dear Angelo, >> >> rma(yi=o, sei=se, mods=~s+t-1, method="REML") >> >> is *a* way to run the arm-based pairwise meta-analysis. Whether it is the >> *correct* way is a question I cannot answer. >> >> lme(o~s+t-1, random=~t-1 | s, weights=(~ se^2)) >> >> is a different model. First of all, it adds a random effect only to >> each treatment arm within each study, while the rma model above gives >> a random effect to each observation. Moreover, the lme model assumes >> that the sampling variances are only known up to a proportionality >> constant, while the rma model assumes that they are known exactly. >> >> Similarly, >> >> lm(formula = o ~ s + t - 1, weights = 1/se.o^2) >> >> assumes that the sampling variances are only known up to a >> proportionality constant, while rma (with method="FE") assumes that they >> are known exactly. >> >> For the same reason will >> >> rma(yi=e, sei=se, method="REML") >> lme(e~1, random=~1 | s, weights=(~ se.e^2)) >> >> and >> >> rma(yi=e, sei=se.e, method="FE") >> lm(e~1, weights = 1/se.e^2) >> >> not give you the same results. >> >> Best, >> >> -- >> Wolfgang Viechtbauer http://www.wvbauer.com/ >> Department of Methodology and Statistics Tel: +31 (0)43 388-2277 >> School for Public Health and Primary Care Office Location: >> Maastricht University, P.O. Box 616 Room B2.01 (second floor) >> 6200 MD Maastricht, The Netherlands Debyeplein 1 (Randwyck) >> >> >> ----Original Message---- >> From: Angelo Franchini [mailto:angelo.franch...@bristol.ac.uk] >> Sent: Wednesday, August 04, 2010 16:26 >> To: Viechtbauer Wolfgang (STAT) >> Cc: 'Angelo Franchini'; r-help@r-project.org >> Subject: RE: [R] metafor and meta-analysis at arm-level >> >>> Hello Wolfgang. >>> >>> I'd appreciate if you could help me check whether I am doing the >>> proper thing to do an arm-level meta-analysis with metafor and what >>> differences there might be in trying to do the same with lme and lm. >>> >>> I am following the arm based model described in section 3.2 of the >>> Salanti's paper that you mentioned in your previous e-mail, namely: >>> >>> theta = B*eta + X*mu + W*beta >>> >>> where: >>> theta = vector of parameter for outcomes in treatment arms (theta_ij >>> for study i, treat. arm j) eta = vector of parameter for outcomes in >>> control arms (eta_i for study i) mu = vector of effects (treat. vs >>> cont.) (mu_ij for study i, treat. arm j) beta = vector of random >>> effects (beta_ij for study i, treat. arm j) >>> >>> >>> In my specific case with a pairwise meta-analysis, I had my data >>> arranged as in columns for the following variables: s t o se >>> >>> with >>> s as study/trial identifier >>> t as 0/1 for control/treatment arm >>> o as observed outcome in control or treatment arm >>> se as standard error of that outcome measure >>> >>> I then ran metafor as: >>> rma(yi=o, sei=se, mods=~s+t-1, method="REML") >>> >>> for random effects, and REML replaced by FE for fixed effects. >>> >>> Is that the correct way to run the arm-based pairwise meta-analysis? >>> >>> Shouldn't I be able to obtain similar results with LME for >>> random-effects by using the command: lme(o~s+t-1, random=~t-1 | s, >>> weights=(~ se^2)) >>> >>> and for fixed-effects with: >>> lm(formula = o ~ s + t - 1, weights = 1/se.o^2) >>> >>> >>> For the trial-based pairwise meta-analysis I used: >>> data arranged as: >>> s e se >>> >>> with: >>> s study >>> e effect >>> se standard error >>> >>> and commands: >>> rma(yi=e, sei=se, method="REML") >>> >>> or >>> >>> lme(e~1, random=~1 | s, weights=(~ se.e^2)) >>> >>> for random-effects, while for fixed-effects: >>> rma(yi=e, sei=se.e, method="FE") >>> lm(e~1, weights = 1/se.e^2) >>> >>> Does that make sense? >>> >>> >>> Many thanks for any comment/advice on this matter. >>> Best regards, >>> Angelo ______________________________________________ R-help@r-project.org 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.