knitr::opts_chunk$set(echo = FALSE, results = "asis")
K <- params$K alpha <- params$alpha beta <- params$beta lambda0 <- params$lambda0 delta1 <- params$delta1 delta0 <- params$delta0 ratio_type <- params$ratio_type ratio_init <- params$ratio_init ratio_scenario <- params$ratio_scenario ratio <- params$ratio correction <- params$correction power <- params$power integer <- params$integer N <- params$large_N n <- params$small_n opchar <- params$opchar gamma <- params$gamma gammaO <- params$gammaO plots <- params$plots
if (correction == "bonferroni") { correction_text <- "Bonferroni's correction" } else if (correction == "dunnett") { correction_text <- "Dunnett's correction" } else if (correction == "none") { correction_text <- "no multiple comparison correction" } else if (correction == "sidak") { correction_text <- "Sidak's correction" } else if (correction == "benjamini_hochberg") { correction_text <- "the Benjamini-Hochberg correction" } else if (correction == "benjamini_yekutieli") { correction_text <- "the Benjamini-Yekutieli correction" } else if (correction == "hochberg") { correction_text <- "Hochberg's correction" } else if (correction == "holm_bonferroni") { correction_text <- "the Holm-Bonferroni correction" } else if (correction == "holm_sidak") { correction_text <- "the Holm-Sidak correction" } else if (correction == "step_down_dunnett") { correction_text <- "the step-down version of Dunnett's correction" } if (power == "marginal") { power_type_text <- "marginal power for each null hypothesis" power_scenario_text <- "each of their respective least favourable configurations" } else { power_scenario_text <- "the global alternative hypothesis" if (power == "conjunctive") { power_type_text <- "conjunctive power" } else if (power == "disjunctive") { power_type_text <- "disjunctive power" } } if (ratio_type == "equal_all") { ratio_text <- "the same as the control arm" } else if (ratio_type == "equal_exp") { ratio_text <- paste0(ratio_init[1], " times that of the control arm") } else if (ratio_type == "unequal") { ratio_text <- paste0(paste(ratio_init[1:K], collapse = ", "), " times that of the control arm") } else if (ratio_type == "root_K") { ratio_text <- paste0(round(1/sqrt(K), 3), " times that of the control arm") } else { ratio_text <- paste0("chosen for ", ratio_type, "-optimality under", " the ", ratio_scenario, "-response rate ", "scenario") } if (integer) { integer_text <- "will" } else { integer_text <- "will not" } if (plots) { plot_text <- "will" } else { plot_text <- "will not" }
The following choices were made:
r K
}$ experimental treatments will be included in the trial.r alpha
}$ will be used, in combination with r correction_text
.r lambda0
}$.r power_type_text
will be controlled to level $1-\beta = \boldsymbol{r 1 - beta
}$ under r power_scenario_text
.r round(delta1, 3)
}$ and $\delta_0 = \boldsymbol{r round(delta0, 3)
}$ respectively.r ratio_text
.r integer_text
be required to be an integer.r plot_text
be produced.FWER <- round(opchar$FWERI1[1], 3) if (correction %in% c("benjamini_hochberg", "benjamini_yekutieli", "hochberg", "holm_bonferroni", "holm_sidak", "step_down_dunnett")) { punc_text_3 <- "s" gamma_text <- paste0("(", paste(round(gammaO, 3), collapse = ", "), ")") } else { punc_text_3 <- "" gamma_text <- round(gamma, 3) } if (power == "marginal") { power_type_text <- "minimum marginal power" power_value <- round(min(diag(as.matrix(opchar[-(1:2), (K + 4):(2*K + 3)]))), 3) } else { power_scenario_text <- "the global alternative hypothesis" if (power == "conjunctive") { power_type_text <- "conjunctive power" power_value <- round(opchar$Pcon[2], 3) } else if (power == "disjunctive") { power_type_text <- "disjunctive power" power_value <- round(opchar$Pdis[2], 3) } }
r round(N, 3)
}$.r paste(round(n, 3), collapse = ", ")
)}$.r paste(round(ratio, 3), collapse = ", ")
)}$.r FWER
}$.r power_type_text
is: $\boldsymbol{r power_value
}$.r punc_text_3
should be used with the chosen multiple comparison correction: $\boldsymbol{r gamma_text
}$.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.