[R] Model studies in one analysis using treatment as a five level moderator in a meta-regression
Michael Dewey
lists at dewey.myzen.co.uk
Wed Jun 28 17:05:47 CEST 2017
Dear Jay
I am not that familiar with the meta package but it looks as though it
does not allow you to do a meta-regression within metaprop. However
there is a function metareg which takes the object you created with
metaprop and allows you to add a moderator so i would try that next. By
moderator in this case I mean your variable Treatment.
On 26/06/2017 19:19, Jay Zola wrote:
> Hello,
>
>
> I am medical student, writing a meta-analysis on complication and reoperation rates after the five most common treatments of distal radius fractures. I have been busy with the statistics for months by my self, but find it quite hard since our classes were very basic. Now I want to compare the treatment modalities to see if there are significant differences. Using R I was able to synthesize the complication rates and reoperation rates for each treatment method. But I never had any R course and managed by trial and error, so the code probably doesn't look that great. Someone told me I could best model the data in one analysis using treatment as a five level moderator in a meta-regression. Can some help me with the R code to do this? Your help would be very much appreciated.
>
>
> Thank you,
>
>
> Jay
>
>
> Study| Event Type| Treatment| Number of Events (n)| N| n/N|
>
> Kumaravel| Complications| EF| 3| 23| 0,1304348|
>
> Franck| Complications| EF| 2| 20| 0,1|
>
> Schonnemann| Complications| EF| 8| 30| 0,2666667|
>
> Aita| Complications| EF| 1| 16| 0,0625|
>
> Hove| Complications| EF| 31| 39| 0,7948718|
>
> Andersen| Complications| EF| 26| 75| 0,3466667|
>
> Krughaug| Complications| EF| 22| 75| 0,2933333|
>
> Moroni| Complications| EF| 0| 20| 0|
>
> Plate| Complications| IMN| 3| 30| 0,1|
>
> Chappuis| Complications| IMN| 4| 16| 0,25|
>
> Gradl| Complications| IMN| 12| 66| 0,1818182|
>
> Schonnemann| Complications| IMN| 6| 31| 0,1935484|
>
> Aita| Complications| IMN| 1| 16| 0,0625|
>
> Dremstrop| Complications| IMN| 17| 44| 0,3863636|
>
> Wong| Complications| PC| 1| 30| 0,0333333|
>
> Kumaravel| Complications| PC| 4| 25| 0,16|
>
>
> Dataset on my dropbox: https://www.dropbox.com/s/j1urqzr99bt76ip/Basics%20excel%20file%20complication%20and%20reoperation%20rate.xlsx?dl=0
>
> Basics excel file complication and reoperation rate.xlsx<https://www.dropbox.com/s/j1urqzr99bt76ip/Basics%20excel%20file%20complication%20and%20reoperation%20rate.xlsx?dl=0>
> www.dropbox.com
> Shared with Dropbox
>
>
>
>
> library(meta)
> library(stargazer)
> library(foreign)
>
> All <-read.spss("C:\\Users\\313635aa.STUDENT\\Desktop\\Meta-Analyse Complications and Reoperations.sav",to.data.frame = T, use.value.labels = T)
> All <- na.omit(All)
>
> Complications <- All[which(All[,"Event_Type"] == "Complications"),]
> Re_operation <- All[which(All[,"Event_Type"] == "Reoperations"),]
>
> EF <- All[which(All[,"Treatment"] == "EF"),]
> IMN <- All[which(All[,"Treatment"] == "IMN"),]
> pc <- All[which(All[,"Treatment"] == "PC"),]
> KW <- All[which(All[,"Treatment"] == "KW"),]
> VPO <- All[which(All[,"Treatment"] == "VPO"),]
>
> EF_C <- EF[which(EF[,"Event_Type"] == "Complications"),]
> EF_R <- EF[which(EF[,"Event_Type"] == "Reoperations"),]
>
> IMN_C <- IMN[which(IMN[,"Event_Type"] == "Complications"),]
> IMN_R <- IMN[which(IMN[,"Event_Type"] == "Reoperations"),]
>
> pc_C <- pc[which(pc[,"Event_Type"] == "Complications"),]
> pc_R <- pc[which(pc[,"Event_Type"] == "Reoperations"),]
>
> KW_C <- KW[which(KW[,"Event_Type"] == "Complications"),]
> KW_R <- KW[which(KW[,"Event_Type"] == "Reoperations"),]
>
> VPO_C <- VPO[which(VPO[,"Event_Type"] == "Complications"),]
> VPO_R <- VPO[which(VPO[,"Event_Type"] == "Reoperations"),]
>
> Output <- function(x, y, k.min=10){
> file <- metaprop(Events_n, N, Study_ID, data = x)
>
> forest.meta(file, studlab = T, pooled.totals = T, bysort = F)
>
> dev.copy2pdf(file=y, width = 11.69, height = 8.27)
> print(file)
> }
>
> R code on my dropbox: https://www.dropbox.com/s/67pnfpi10qu110v/R%20code%20voor%20forrest%20en%20funnel%20plots.rtf?dl=0
>
> [https://cfl.dropboxstatic.com/static/images/icons128/page_white_word.png]<https://www.dropbox.com/s/67pnfpi10qu110v/R%20code%20voor%20forrest%20en%20funnel%20plots.rtf?dl=0>
>
> R code voor forrest en funnel plots.rtf<https://www.dropbox.com/s/67pnfpi10qu110v/R%20code%20voor%20forrest%20en%20funnel%20plots.rtf?dl=0>
> www.dropbox.com
> Shared with Dropbox
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>
>
--
Michael
http://www.dewey.myzen.co.uk/home.html
More information about the R-help
mailing list