# \donttest{
###Plot Posterior Probabilities of cluster randomized trial###
data(crt4armSimData)
plotPosteriorProbs(method = "crt",data = crt4armSimData, outcome = "posttest",
interventions = "interventions", Random = "schools", Nsim = 10000,
continuous_covariates = c("pretest"), categorical_covariates = c("gender", "ethnicity"),
threshold_range = c(0, 0.1), VerticalLine = 0.05, HorizontalLine = 0.8,
VerticalLineColor= "purple", HorizontalLineColor= "black",
intlabels = c("Intervention A", "Intervention B", "Intervention C"),
intcolors = c("Intervention A" = "blue", "Intervention B" = "red",
"Intervention C" = "green"), maintitle= "Posterior probability plot",
xlabel= "Threshold", ylabel= "Posterior probability",
xbreaks= 0.1, ybreaks= seq(0, 1, by = 0.1))
###Plot Posterior Probabilities of multisite trial###
data(mst4armSimData)
plotPosteriorProbs(method = "ms",data = mst4armSimData, outcome = "posttest",
interventions = "interventions", Random = "schools", Nsim = 10000,
continuous_covariates = c("pretest"), categorical_covariates = c("gender", "ethnicity"),
threshold_range = c(0, 0.1), VerticalLine = 0.05, HorizontalLine = 0.8,
VerticalLineColor= "purple", HorizontalLineColor= "black",
intlabels = c("Intervention A", "Intervention B", "Intervention C"),
intcolors = c("Intervention A" = "blue", "Intervention B" = "red",
"Intervention C" = "green"), maintitle= "Posterior probability plot",
xlabel= "Threshold", ylabel= "Posterior probability",
xbreaks= 0.1, ybreaks= seq(0, 1, by = 0.1))
###Futility analysis of simple randomized trial###
data(srt4armSimData)
plotPosteriorProbs(method = "srt",data = srt4armSimData, outcome = "posttest",
interventions = "interventions", Nsim = 10000, threshold_range = c(0, 0.2),
continuous_covariates = c("pretest"), categorical_covariates = c("gender", "ethnicity"),
VerticalLine = 0.05, HorizontalLine = 0.8, VerticalLineColor= "purple",
HorizontalLineColor= "black", intlabels = c("Intervention A", "Intervention B",
"Intervention C"), intcolors = c("Intervention A" = "#1F77B4",
"Intervention B" = "#D62728", "Intervention C" = "#2CA02C"),
maintitle= "Posterior probability plot", xlabel= "Threshold",
ylabel= "Posterior probability", xbreaks= 0.1, ybreaks= seq(0, 1, by = 0.1))
# }
Run the code above in your browser using DataLab