[R] "metafor" package, proportions: single groups wrt to a categorical dependent variable‏

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Wed Aug 1 10:58:49 CEST 2012


Dear Dushanthi,

Please keep your e-mails on the R-Help list, where Michael has already given you some excellent advice. As Michael already explained, metafor can handle proportions, but does not have any specific functionality for categorical variables with more than 2 levels (at the moment). So, if it is logical and possible to do so, you could collapse the levels of the categorical outcome to 2 levels and then proceed with the proportions. To be specific, what you need is the total sample size (let's call this variable ni) and the number of "cases" (e.g., the number of people that improved) (let's call this variable xi) for each study. For example:

xi <- c(12, 18, 6)
ni <- c(30, 70, 40)
res <- rma(measure="PR", xi=xi, ni=ni)
res
forest(res)

just to give you an idea. There are also various transformations that can be applied to proportions and depending on your data, it may be more sensible to work with one of these transformations. See "Proportions and Transformations Thereof" under ?escalc.

Of course, by doing so, you lose some information. More advanced would be to use an ordinal regression or a multinomial model.

Also, regarding your analysis plan -- while it is fine in principle, I hope you are not planning to use the information obtained in this way to draw any conclusions about the relative effectiveness of the two surgical procedures. Based on what you wrote, it seems as if these are non-randomized studies "with one or the other procedure applied." Therefore, any comparisons you make would be purely observational and may be related to other variable that confound any difference you may find. 

Best,

Wolfgang

--   
Wolfgang Viechtbauer, Ph.D., Statistician   
Department of Psychiatry and Psychology   
School for Mental Health and Neuroscience   
Faculty of Health, Medicine, and Life Sciences   
Maastricht University, P.O. Box 616 (VIJV1)   
6200 MD Maastricht, The Netherlands   
+31 (43) 388-4170 | http://www.wvbauer.com   


> -----Original Message-----
> From: Dushanthi Pinnaduwage [mailto:dushanthi at bell.net]
> Sent: Tuesday, July 31, 2012 16:40
> To: wvb at metafor-project.org; Dushanthi Pinnaduwage
> Subject: "metafor" package, proportions: single groups wrt to a
> categorical dependent variable‏
> 
> Dear Dr. Wolfgang Viechtbauer,
> 
> I am using R version 2.15.0 and 'metafor' package version 1.6-0. Can this
> version of the package handle proportions from
> a categorical dependent variable for single studies? I mean can the
> package functions handle more than 2 proportions ?
> I know it can handle binary variables.
> 
> If it can handle how do I set up my dataframe for the raw data from
> different studies? Also
> how do I give inputs, specially xi, mi (or ni) to the function escalc()?
> 
> Thanks,
> Dushanthi



More information about the R-help mailing list