Get Power And Average Sample Number
Source:R/f_design_group_sequential.R
getPowerAndAverageSampleNumber.Rd
Returns the power and average sample number of the specified design.
Usage
getPowerAndAverageSampleNumber(design, theta = seq(-1, 1, 0.02), nMax = 100)
Value
Returns a PowerAndAverageSampleNumberResult
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 adata.frame
,as.matrix()
to coerce the object to amatrix
.
Details
This function returns the power and average sample number (ASN) of the specified
design for the prototype case which is testing H0: mu = mu0 in a one-sample design.
theta
represents the standardized effect (mu - mu0) / sigma
and power and ASN
is calculated for maximum sample size nMax
.
For other designs than the one-sample test of a mean the standardized effect needs to be adjusted accordingly.
How to get help for generic functions
Click on the link of a generic in the list above to go directly to the help documentation of
the rpact
specific implementation of the generic.
Note that you can use the R function methods
to get all the methods of a generic and
to identify the object specific name of it, e.g.,
use methods("plot")
to get all the methods for the plot
generic.
There you can find, e.g., plot.AnalysisResults
and
obtain the specific help documentation linked above by typing ?plot.AnalysisResults
.
See also
Other design functions:
getDesignCharacteristics()
,
getDesignConditionalDunnett()
,
getDesignFisher()
,
getDesignGroupSequential()
,
getDesignInverseNormal()
,
getGroupSequentialProbabilities()
Examples
if (FALSE) { # \dontrun{
# Calculate power, stopping probabilities, and expected sample
# size for the default design with specified theta and nMax
getPowerAndAverageSampleNumber(
getDesignGroupSequential(),
theta = seq(-1, 1, 0.5), nMax = 100)
} # }