alpNeeded2 {agpower}R Documentation

Function to compute alpha needed (fixed sample size)

Description

Function to compute two-sided alpha needed to achieve target power given a rate ratio. Useful for computing probability to achieve hurdles.

Usage

alpNeeded2(N, bta1, thta, L, pow = 0.8, ar = 0.5)

Arguments

N

Sample size.

bta1

log-transform of rate ratio.

thta

Variance of frailty parameter.

L

Number of events.

pow

Target power.

ar

Allocation ratio (Number control / Total).

Details

This function computes the two-sided alpha alp. Function assumes a rate ratio < 1 is favourable to treatment.

Value

The two-sided alpha level.

Examples


# alpha needed to achieve multiple powers given rate ratio (and other input).
alpNeeded2(N = 1000, bta1 = log(0.8), thta = 2, L = 1000, pow = c( .7, .8))

# alpha needed for many inputs
if (require("dplyr") & require("tidyr")) {


}



[Package agpower version 0.1.2 Index]