Learn R Programming

rpact (version 2.0.6)

getPowerAndAverageSampleNumber: Get Power And Average Sample Number

Description

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

Usage

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

Arguments

design

The design.

theta

A vector of standardized effect sizes.

nMax

The maximum sample size.

Value

Returns a PowerAndAverageSampleNumberResult object.

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.

Examples

Run this code
# NOT RUN {
getPowerAndAverageSampleNumber(
    getDesignGroupSequential(), 
    theta = seq(-1, 1, 0.5), nMax = 100)

# }

Run the code above in your browser using DataLab