getPowerAndAverageSampleNumber {rpact} | R Documentation |
Returns the power and average sample number of the specified design.
getPowerAndAverageSampleNumber(design, theta = seq(-1, 1, 0.02), nMax = 100)
design |
The design. |
theta |
A vector of standardized effect sizes. |
nMax |
The maximum sample size. |
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.
getPowerAndAverageSampleNumber( getDesignGroupSequential(), theta = seq(-1, 1, 0.5), nMax = 100)