[R] Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model
Jay Zola
jayjay.1988 at hotmail.nl
Thu Jun 29 19:38:12 CEST 2017
Hello,
I am writing a meta-analysis on the complication and reoperation rates after 5 treatment modalities of a distal radius fracture. I have a code to compare the complication and reoperation rates. Currently it is using a mixed effects model. Is it possible to change the code so a random effects model is used?
Thank you very much,
Jay
R code
library(meta) library(readxl) All <- read_excel("Basics excel file complication and reoperation rate.xlsx", sheet=1) names(All) <- c("Study_ID","Event_Type","Treatment","Events_n","N","nN") All$Treatment <- factor(All$Treatment, levels=c("PC","EF","IMN","KW","VPO")) # Outcomes Complications <- subset(All, Event_Type=="Complications") Reoperations <- subset(All, Event_Type=="Reoperations") # Comparison of treatment effects to gold standard in the Complications subset mtpr1 <- metaprop(Events_n, N, Study_ID, data = Complications) meta::metareg(mtpr1, ~Treatment) # Comparison of treatment effects to gold standard in the Reoperations subset mtpr2 <- metaprop(Events_n, N, Study_ID, data = Reoperations) meta::metareg(mtpr2, ~Treatment) # Comparison of treatment effects to gold standard in the All dataset # Interaction effects have been considered mtpr <- metaprop(Events_n, N, Study_ID, data = All) meta::metareg(mtpr, ~Treatment*Event_Type)
A part of the dataset:
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|
[[alternative HTML version deleted]]
More information about the R-help
mailing list