## Load datasets of trials on antidepressant drugs
data(dat.ad)
## Assess fragility of trial 13 at multiple significance levels
out1 <- frag.study.alpha(e0, n0, e1, n1, data = dat.ad[13,])
out1
## Generate plots to show the change of fragility measure,
## where the default plot is for the first method
## (i.e., Fisher's exact test) if the argument method is not specified
plot(out1)
## The plot for odds ratio
plot(out1, method = "OR")
## Change the choices of significance levels
out2 <- frag.study.alpha(e0, n0, e1, n1, data = dat.ad[13,],
methods = "OR", alpha.from = 0.001, alpha.to = 0.1, alpha.breaks = 500)
out2
plot(out2)
## Generate the plot with the x-axis on the log scale
plot(out2, log = "x")
## Generate the plot for fragility quotient (in percentage)
plot(out2, fragility = "FQ", log = "x")
## Generate the plot for fragility quotient (in decimal form)
plot(out2, fragility = "FQ", percentage = FALSE, log = "x")
## Change the size of points
plot(out2, cex.pts = 1, log = "x")
## Change the colors
plot(out2, col.line = "blue", col.pval = "orange",
col.sig = c("gray", "black"), log = "x")
## Change the line type
plot(out2, lty.pval = 3, log = "x")
## Change the line width
plot(out2, lwd = 2, lwd.pval = 2, log = "x")
## Change the point symbol
plot(out2, pch = 1, log = "x")
Run the code above in your browser using DataLab