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 On Fri, July 9, 2010 11:55 am, Viechtbauer Wolfgang (STAT) wrote: > With "appropriate design matrix", I mean the X matrix in the mixed-effects > model y = Xb + u + e, where y is the vector of outcomes, u is a vector of > (possibly correlated) random effects, and e is a vector of (possibly) random errors. The X matrix is specified via the 'mods' argument in the rma() function. If y consists of arm-level outcomes, then you need appropriate dummy variables in X to code what type of arm the outcome corresponds to. > > Have you read, for example: > > Salanti, G., Higgins, J. P. T., Ades, A. E., & Ioannidis, J. P. A. (2008). > Evaluation of networks of randomized trials. Statistical Methods in Medical Research, 17(3), 279-301. > > This article may be helpful. > > 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: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Angelo Franchini Sent: Tuesday, July 06, 2010 10:37 To: Wolfgang Viechtbauer > Cc: r-help@r-project.org; Angelo Franchini > Subject: Re: [R] metafor and meta-analysis at arm-level > >> Hello Wolfgang, >> Thank you very much for your response. >> When you mentionthe "appropriate design matrix", do you mean by that the 'n1i, n2i, m1i, m2i, sd1i, sd2i' arguments of the rma function, or am I missing something? I read the documentation on metafor >> (introduction), rma/rma.uni and escalc, and that was the only way that I could find for the package to use information at the arm-level rather than the trial one. >> As for the complexity of possible correlations between effects, that is something to be considered for the network analysis case, correct? Many thanks. >> Best regards, >> Angelo >> On Sun, July 4, 2010 6:06 am, Wolfgang Viechtbauer wrote: >>> Hello Angelo, >>> You can either supply the arm-level outcomes and corresponding sampling variances directly (via the yi and vi arguments) or supply the necessary information so that the escalc() or rma() functions can calculate an appropriate arm-level outcome (such as the log odds). See the documentation of the escalc() function and in particular the part about proportions and tranaformations thereof as possible outcome measures. >>> This is the easy part. Then you need to set up an appropriate design matrix to code what arm each observed outcome corresponds to. And finally comes the tricky/problematic part. The rma() function assumes independent sampling errors and independent random effects for each observed outcome. Independent sampling errors is (usually) ok when using arm-level outcomes, but the independent random errors part may not be appropriate. This is why I am working on functions that do not make this independence assumption. With those functions, you can then carry out multivariate and network-type meta-analyses. These >>> functions will become part of the metafor package in the future. Best, >>> -- >>> Wolfgang Viechtbauer >>> http://www.wvbauer.com >>> "Angelo Franchini" <angelo.franch...@bristol.ac.uk> wrote: >>>> Hi, >>>> I have been looking for an R package which allowed to do >>>> meta-analysis (both pairwise and network/mixed-treatment) at >>>> arm-level rather than at trial-level, the latter being the common way in which meta-analysis is done. By arm-level meta-analysis I mean one that accounts for data provided at the level of the >>>> individual arms of each trial and that does not simply derive the difference between arms and do the meta-analysis on that. >>>> I am not sure metafor can do that, but hopefully someone more experienced on it can clarify that to me. I can see that it can take data in both forms, arm and trial level, but it looks as if the arm-level information would be converted into trial one through escalc and the latter then used for the meta-analysis. Is that right? >>>> Many thanks. >>>> Angelo >>>> -- >>>> NIHR Research Methods Training Fellow, >>>> Department of Community Based Medicine >>>> University of Bristol >>>> 25 Belgrave Road >>>> Bristol BS8 2AA >>>> Tel. 0779 265-6552 >>>> ______________________________________________ >>>> 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. > -- NIHR Research Methods Training Fellow, Department of Community Based Medicine University of Bristol 25 Belgrave Road Bristol BS8 2AA Tel. 0779 265-6552 ______________________________________________ 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.