Learn R Programming

optconerrf (version 1.0.1)

getPsi: Calculate Psi, the Inverse of Nu Prime

Description

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

Usage

getPsi(nuPrime, conditionalPower)

Value

The value of alpha which corresponds to nuPrime and lies between 0 and 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.

Examples

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

Run the code above in your browser using DataLab