Learn R Programming

gsDesign2 (version 1.1.3)

get_combo_power: Function to calculate power

Description

A helper function passed to uniroot()

Usage

get_combo_power(n, bound, info_fh, theta_fh, corr_fh, algorithm, beta, ...)

Value

The optimal sample size (a single numeric value)

Arguments

n

Input sample size

algorithm

an object of class GenzBretz, Miwa or TVPACK specifying both the algorithm to be used as well as the associated hyper parameters.

beta

Type II error.

...

Additional parameters passed to mvtnorm::pmvnorm.

Details

This function calculates the difference between the derived power and the targeted power (1 - beta), based on the provided sample size, upper and lower boundaries, and treatment effect.