Wrapper function for the hypothesis in the trial.

hypothesis(
  delta = 0,
  futility_prob = 0.05,
  prob_accept_ha = 0.95,
  expected_success_prob = 0.9,
  alternative = "greater",
  .data = NULL
)

Arguments

delta

numeric. Threshold set for margin in null hypothesis. The default is set to 0.

futility_prob

numeric. Probability of futility. The default is 0.05.

prob_accept_ha

numeric. Posterior probability of accepting alternative hypothesis. The default is 0.95.

expected_success_prob

numeric. Probability of expected success.

alternative

character. The string specifying the alternative hypothesis, must be one of "greater" (default), "less" or "two.sided".

.data

NULL. This should not be changed by the user.

Value

A list with information of hypothesis testing (threshold, futility probability, probability of accepting the alternative hypothesis, and probability of expected success).

Examples

hypothesis(delta = 0, futility_prob = 0.05, prob_accept_ha = 0.95, expected_success_prob = 0.90, alternative = "greater")
#> $h0 #> [1] 0 #> #> $futility_prob #> [1] 0.05 #> #> $prob_ha #> [1] 0.95 #> #> $expected_success_prob #> [1] 0.9 #> #> $alternative #> [1] "greater" #>
hypothesis(delta = 0.2, futility_prob = 0.1, prob_accept_ha = 0.975, expected_success_prob = 0.80, alternative = "less")
#> $h0 #> [1] 0.2 #> #> $futility_prob #> [1] 0.1 #> #> $prob_ha #> [1] 0.975 #> #> $expected_success_prob #> [1] 0.8 #> #> $alternative #> [1] "less" #>