View source: R/f_design_futility_bounds.R
| getFutilityBounds | R Documentation |
This function converts futility bounds between different scales such as z-value, p-value, conditional power, predictive power, reverse conditional power, and effect estimate.
getFutilityBounds(
sourceValue,
...,
sourceScale = c("zValue", "pValue", "conditionalPower", "condPowerAtObserved",
"predictivePower", "reverseCondPower", "effectEstimate"),
targetScale = c("zValue", "pValue", "conditionalPower", "condPowerAtObserved",
"predictivePower", "reverseCondPower", "effectEstimate"),
design = NULL,
theta = NA_real_,
information = NA_real_,
naAllowed = FALSE
)
sourceValue |
A numeric vector representing the futility bounds in the source scale. |
... |
Ensures that all arguments (starting from the "...") are to be named and that a warning will be displayed if unknown arguments are passed. |
sourceScale |
Character. The scale of the input futility bounds.
Must be one of |
targetScale |
Character. The scale to which the futility bounds should
be converted. Must be one of |
design |
The trial design. Required if either the |
theta |
Numeric. The assumed effect size under the alternative hypothesis. |
information |
Numeric vector of length 2. The information levels at the two stages. |
naAllowed |
Logical. Indicates if |
If the sourceScale and targetScale are the same, the function
returns the input sourceValue without modification.
Otherwise, the function is designed to convert between the specified scales.
A numeric vector representing the futility bounds in the target scale, or
NULL if the conversion is not implemented or yields no result.
getDesignGroupSequential(),
getDesignInverseNormal(),
getDesignFisher() for direct
specification of futility bounds on different scales using the
argument futilityBoundsScale.
## Not run:
# Example with identical source and target scales
getFutilityBounds(
sourceValue = c(0, 0.5),
sourceScale = "zValue",
targetScale = "zValue"
)
# Example with different scales
getFutilityBounds(
design = getDesignGroupSequential(kMax = 2, typeOfDesign = "noEarlyEfficacy", alpha = 0.05),
information = c(10, 10),
sourceValue = 0.5,
sourceScale = "condPowerAtObserved",
targetScale = "pValue"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.