pval_fixed: Determine p-values in a single-stage single-arm trial design...

Description Usage Arguments Details Value See Also Examples

View source: R/pval_fixed.R

Description

Determines all possible p-values at the end of a single-stage single-arm trial for a single binary endpoint, as determined using des_fixed(). Support is available to compute p-values using exact binomial tail probabilities, or using a normal approximation.

Usage

1
pval_fixed(des, pi, method = c("exact", "normal"), summary = F)

Arguments

des

An object of class "sa_des_fixed", as returned by des_fixed().

pi

A vector of response probabilities to evaluate the expected performance of the p-value calculation procedure at. This will internally default to be the π0 and π1 from des if it is left unspecified.

method

A vector of methods to use to construct p-values. Currently, support is available to use exact binomial tail probabilities ("exact") and to use a normal approximation ("normal") approach.

summary

A logical variable indicating whether a summary of the function's progress should be printed to the console.

Details

In addition, the performance of the chosen p-value calculation procedures (including their expected value and variance) for each value of pi in the supplied vector pi, will also be evaluated.

Value

A list of class "sa_pval_fixed" containing the following elements

See Also

des_fixed, opchar_fixed, est_fixed, ci_fixed, and their associated plot family of functions.

Examples

1
2
3
4
5
# Find the optimal single-stage design for the default parameters
des  <- des_fixed()
# Determine the performance of both supported p-value calculation procedures
# for a range of possible response probabilities
pval <- pval_fixed(des, pi = seq(0, 1, 0.01))

mjg211/singlearm documentation built on May 8, 2021, 3:17 a.m.