## Load datasets of meta-analyses on nutrition support
data(dat.ns)
## Assess fragility of the 11th meta-analysis
out1 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,])
out1
## Visualize the process of event status modifications
## for altering the non-significance to significance
plot(out1)
## Assess fragility based on relative risk
out2 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,],
measure = "RR")
out2
## Assess fragility based on risk difference
out3 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,],
measure = "RD")
out3
## Use the REML method to estimate the heterogeneity variance
out4 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,],
method = "REML")
out4
## Use the Hartung-Knapp-Sidik-Jonkman to derive
## the confidence interval in meta-analysis
out5 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,],
method = "REML", test = "knha")
out5
## Change the significance level to 0.005
out6 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 11,],
alpha = 0.005)
out6
plot(out6)
## Reduce the distance between the two lines by breaking the y-axis
plot(out6, ybreaks = c(5, 9))
## Suppress the markers of study IDs around the lines
plot(out6, ybreaks = c(5, 9), study.marker = FALSE)
## Change the size of markers of study IDs
plot(out6, ybreaks = c(5, 9), cex.marker = 0.5)
## Change the distance between the markers of study IDs and the lines
plot(out6, ybreaks = c(5, 9), offset.marker = 0)
## Change the colors and width of the lines
plot(out6, ybreaks = c(5, 9), col.line = c("gray", "orange"), lwd = 2)
## Change the location of the legend
plot(out6, ybreaks = c(5, 9), x.legend = "topleft")
# \donttest{
## Assess fragility of the first meta-analysis;
## it takes longer time
out7 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,])
out7
plot(out7)
plot(out7, ybreaks = c(840, 880))
## Achieve significance by moving the CI based on the direction of the
## original overall effect size estimate
out8 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,],
mod.dir = "one")
out8
## Achieve significance by moving the CI to the left side
out9 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,],
mod.dir = "left")
out9
## Achieve significance by moving the CI to the right side;
## it takes longer time than that moving the CI to the left side
## as the original overall effect size estimate was less than the null
out10 <- frag.ma(e0, n0, e1, n1, data = dat.ns[dat.ns$ma.id == 1,],
mod.dir = "right")
out10
dev.new(width = 12, height = 6)
plot(out10, cex.marker = 0.5)
# }
Run the code above in your browser using DataLab