Как отобразить вес в анализе подгрупп в Metafor / R? - PullRequest
0 голосов
/ 18 ноября 2018

Я подготовил Лесной участок в приложении.

enter image description here

Я применил showweights = TRUE, что дает мне вес каждого исследования для всей оценки.

Тем не менее, я провел анализ подгрупп на основе некоторых основных характеристик исследования. Анализ каждой подгруппы дает оценку подгруппы. Можно ли показать весовые коэффициенты для оценки подгруппы?

My data
q <- structure(list(study = structure(c(1L, 4L, 5L, 6L, 2L, 3L), .Label = c("Ho et al.", "Lee et al.", "Li et al. ", "Plontke et al.", "Wu et al.", "Xenellis et al."), class = "factor"), ai = c(11L, 6L, 24L, 9L, 10L, 9L), bi = c(4L, 5L, 3L, 10L, 11L, 15L), ci = c(7L, 5L, 6L, 0L, 4L, 0L), di = c(7L, 5L, 22L, 18L, 21L, 21L), year = c(2004L, 2009L, 2011L, 2006L, 2011L, 2010L), citation = structure(c(6L, 4L, 2L, 5L, 1L, 3L), .Label = c("[23]", "[24]", "[25]", "[26]", "[27]", "[28]"), class = "factor"), mod = c(1L, 1L, 0L, 0L, 1L, 0L), bias = c(1L, 0L, 0L, 1L, 1L, 1L), n1 = c(15L, 11L, 27L, 19L, 21L, 24L), n2 = c(14L, 10L, 28L, 18L, 25L, 21L), follow = c(0L, 0L, 0L, 1L, 1L, 1L)), .Names = c("study", "ai", "bi", "ci", "di", "year", "citation", "mod", "bias", "n1", "n2","follow"), class = "data.frame", row.names = c(NA, -6L)) 

Я привык к следующему сценарию:

library(metafor)
q <- escalc(measure="OR", ai=ai, bi=bi, ci=ci, di=di, data=q)
q1 <- rma(yi, vi, data=q, slab=paste(study, year, citation, sep=", "), method = "FE")


## Forest
forest(q1, xlim=c(-20,14), at=log(c(0.15,1,8,50,250)), atransf = exp, showweights = TRUE,
       ilab=cbind(q$ai, q$bi, q$n1, q$ci, q$di, q$n2),
       ilab.xpos=c(-11,-9.5,-8.0,-6,-4.5,-3), cex=1, ylim=c(-1, 18), font=1, digits=2, col="darkgrey",
       order=order(q$mod),
       rows=c(3.5:5.5,11.5:13.5),
       xlab="Odds ratio ", mlab="")


text(-20, c(15,7), font=2, cex=1, pos=4, c("Severe to profound PTA at baseline","Moderate to severe PTA at baseline"))

text(-20, -0.5, pos=4, cex=1, font=2, 
     bquote(paste("Fixed-effects model for all studies: Q = ",
                  .(formatC(q1$QE, digits=2, format="f")), 
                  ", df = ", .(q1$k - q1$p),", p = ", 
                  .(formatC(q1$QEp, digits=2, format="f")),
                  ", ", I^2, " = ",
                  .(formatC(q1$I2, digits=2, format="f")), 
                  "%")))

# Headlines
text(c(-11,-9.5,-8.0,-6,-4.5,-3)     ,16.5,font=3, cex=0.9, c(">10 dB", "<10 dB","Total", ">10 dB", "<10 dB","Total"))
text(c(-9.6,-5)               ,17.5,font=2, cex=1, c("IT-Dex Salvage", "Control"))
text(-20                       ,16.5,font=1,cex=0.9, "Author, year & reference",  pos=4)
text(14                        ,16.5,font=2, "Weight (%) and Odds ratio [95% CI]", pos=2, cex=0.9)

res.qq <- rma(ai=ai, bi=bi, ci=ci, di=di, 
              data=q, measure="OR",subset=(q$mod==0), method="FE")

res.qqq <- rma(ai=ai, bi=bi, ci=ci, di=di, 
               data=q, measure="OR",subset=(q$mod==1), method="FE")

addpoly(res.qq, row=2, cex=0.9, atransf=exp, mlab="Sum for moderate to severe")
addpoly(res.qqq, row= 10, cex=0.9, atransf=exp, mlab="Sum for severe to profound")

text(-20, 1, pos=4, cex=0.9, bquote(paste("Fixed-effects model: Q = ",
                                            .(formatC(res.qq$QE, digits=2, format="f")), 
                                            ", df = ", .(res.qq$k - res.qq$p),", p = ", 
                                            .(formatC(res.qq$QEp, digits=2, format="f")),
                                            ", ", I^2, " = ",
                                            .(formatC(res.qq$I2, digits=2, format="f")), 
                                            "%")))

text(-20, 9, pos=4, cex=0.9, bquote(paste("Fixed-effects model: Q = ",
                                             .(formatC(res.qqq$QE, digits=2, format="f")), 
                                             ", df = ", .(res.qqq$k - res.qqq$p),", p = ", 
                                             .(formatC(res.qqq$QEp, digits=2, format="f")),
                                             ", ", I^2, " = ",
                                             .(formatC(res.qqq$I2, digits=2, format="f")), 
                                             "%")))
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...