Jay Zola
2017-Jun-29 17:38 UTC
[R] Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model
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]]
Viechtbauer Wolfgang (SP)
2017-Jun-29 17:47 UTC
[R] Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model
The code in your mail in a mangled mess, since you posted in HTML. Please configure your email client to send emails in plain text. Could you explain what exactly you mean by "Currently it is using a mixed effects model. Is it possible to change the code so a random effects model is used?" Best, Wolfgang>-----Original Message----- >From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Jay Zola >Sent: Thursday, June 29, 2017 19:38 >To: r-help at r-project.org >Subject: [R] Change Rcode for a meta-analysis(netmeta) to use a random >effects model instead of a mixed effects model > >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]] > >______________________________________________ >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.
Jay Zola
2017-Jun-29 17:54 UTC
[R] Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model
Link Dropbox R code: https://www.dropbox.com/s/9u6e89t6dq39r53/Rcode%20metaregression.docx?dl=0 Rcode metaregression.docx<https://www.dropbox.com/s/9u6e89t6dq39r53/Rcode%20metaregression.docx?dl=0> www.dropbox.com Shared with Dropbox Link Dropbox part of dataset: https://www.dropbox.com/s/j1urqzr99bt76ip/Basics%20excel%20file%20complication%20and%20reoperation%20rate.xlsx?dl=0 ________________________________ Van: Viechtbauer Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> Verzonden: donderdag 29 juni 2017 19:47 Aan: Jay Zola; r-help at r-project.org Onderwerp: RE: Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model The code in your mail in a mangled mess, since you posted in HTML. Please configure your email client to send emails in plain text. Could you explain what exactly you mean by "Currently it is using a mixed effects model. Is it possible to change the code so a random effects model is used?" Best, Wolfgang>-----Original Message----- >From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Jay Zola >Sent: Thursday, June 29, 2017 19:38 >To: r-help at r-project.org >Subject: [R] Change Rcode for a meta-analysis(netmeta) to use a random >effects model instead of a mixed effects model > >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]] > >______________________________________________ >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.[[alternative HTML version deleted]]
Maybe Matching Threads
- Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model
- Model studies in one analysis using treatment as a five level moderator in a meta-regression
- Model studies in one analysis using treatment as a five level moderator in a meta-regression
- Model studies in one analysis using treatment as a five level moderator in a meta-regression
- Comparing pooled proportions(complication and reoperation rates) of different treatment modalities