getPsi: Calculate Psi, the Inverse of Nu Prime

View source: R/getPsi.R

getPsiR Documentation

Calculate Psi, the Inverse of Nu Prime

Description

Get point-wise values of psi (inverse of nu prime)

Usage

getPsi(nuPrime, conditionalPower)

Arguments

nuPrime

The function value to be inverted.

conditionalPower

The target conditional power CP of the design. Must be a numeric value.

Details

The function \psi is the inverse of:

\nu'(\alpha) = -2 \cdot(\Phi^{-1}(1-\alpha) + \Phi^{-1}(1-CP)) / \phi(\Phi^{-1}(1-\alpha))

. If the conditional power CP lies outside of the range 1-\Phi(2) \leq CP \leq \Phi(2), the calculation is slightly more complicated. The argument conditionalPower is either the fixed target conditional power or the value of the conditional power function at the corresponding first-stage p-value.

Value

The value of alpha which corresponds to nuPrime and lies between 0 and conditionalPower.

Examples

# Returns 0.05
getPsi(getNuPrime(alpha = 0.05, conditionalPower = 0.9), conditionalPower = 0.9)

optconerrf documentation built on Sept. 9, 2025, 5:29 p.m.