getPowerAndAverageSampleNumber {rpact}R Documentation

Get Power And Average Sample Number


Returns the power and average sample number of the specified design.


getPowerAndAverageSampleNumber(design, theta = seq(-1, 1, 0.02), nMax = 100)



The trial design.


A vector of standardized effect sizes (theta values), default is a sequence from -1 to 1.


The maximum sample size. Must be a positive integer of length 1.


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.


Returns a PowerAndAverageSampleNumberResult object. The following generics (R generic functions) are available for this result object:

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()


# Calculate power, stopping probabilities, and expected sample 
# size for the default design with specified theta and nMax  
    theta = seq(-1, 1, 0.5), nMax = 100)

[Package rpact version 4.0.0 Index]