View source: R/f_design_fixed.R
| getDesignFixed | R Documentation |
Create a fixed (single-stage) trial design. This convenience wrapper
constructs an object of class TrialDesignFixed with kMax = 1.
getDesignFixed(
alpha = NA_real_,
beta = NA_real_,
sided = 1L,
directionUpper = NA,
twoSidedPower = NA
)
alpha |
The significance level alpha, default is |
beta |
Type II error rate, necessary for providing sample size calculations
(e.g., |
sided |
Is the alternative one-sided ( |
directionUpper |
Logical. Specifies the direction of the alternative,
only applicable for one-sided testing; |
twoSidedPower |
For two-sided testing, if |
The fixed design represents a single-stage hypothesis test. The returned
object can be used with the standard analysis and plotting helpers in the
package. Typical use is to specify the type I error alpha and the
desired type II error beta (or equivalently power = 1 - beta).
Returns a TrialDesign object.
The following generics (R generic functions) are available for this result object:
names() to obtain the field names,
print() to print the object,
summary() to display a summary of the object,
plot() to plot the object,
as.data.frame() to coerce the object to a data.frame,
as.matrix() to coerce the object to a matrix.
Other design functions:
getDesignCharacteristics(),
getDesignConditionalDunnett(),
getDesignFisher(),
getDesignGroupSequential(),
getDesignInverseNormal(),
getGroupSequentialProbabilities(),
getPowerAndAverageSampleNumber()
# Basic fixed design with default alpha and beta
design <- getDesignFixed()
design
# Custom significance and power
design2 <- getDesignFixed(alpha = 0.05, beta = 0.1)
design2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.