power.surv.test: Power and sample size for survival distribution (One-sample)

View source: R/power.surv.test.R

power.surv.testR Documentation

Power and sample size for survival distribution (One-sample)

Description

Compute power and sample size of test or determine distribution of alternative hypothesis to obtain target power (same as power.anova.test).

Usage

power.surv.test(n = NULL, sig.level = 0.05, s0 = NULL, s1 = NULL, 
                year = 3, accrual = 3, followup = 3, futile = NULL, 
                futile.prob = 0.01, power = NULL, 
                tol = .Machine$double.eps^0.25)

Arguments

n

Number of observations

sig.level

Significance level (Type I error probability)

year

Time point in which survival function is evaluated

s0

Survival function at yaer = year under H0

s1

Survival function at yaer = year under H1

accrual

Years of accrual

followup

Years of followup

power

Power of test (1 minus Type II error probability)

futile

Optinal futility analysis, define the percentage of pearson-year for futility analysis. Value shall be between 0 and 1. Default is NULL.

futile.prob

Significant level of futility analysis. Probability of rejecting the alternative hypothesis when H1 is true. Default is 0.01

tol

tol for uniroot function

Details

These calculations use Poisson process and person-year under exponentioal distribution.

Exactly one of the parameters 'n','power' and 's1' must be passed as NULL, and that parameter is determined from the others. Notice that the last one has non-NULL default so NULL must be explicitly passed if you want to compute it.

Value

Object of class 'power.htest', a list of the arguments (including the computed one) augmented with 'method' and 'note' elements.

person.year

Total person-year of followup required for the final analysis

median.dur

Median duration of followup

crtl.event

Critical value for number of observed events to reject the null hypothesis H0

crtl.survf

Critical value for observed survival function at year = year to reject the null hypothesis H0

futile.pyear

Person-year for interim futility analysis

futile.event

Reject H1 if observed event > futile.event

futile.prob

Probability of rejection H1 in the interim analysis when H1 is true

Note

'uniroot' is used to solve power equation for unknowns, so you may see errors from it, notably about inability to bracket the root when invalid arguments are given.

Author(s)

Bingshu E. Chen (bingshu.chen@queensu.ca)

References

Lawless, J. Statistical Models and Methods for Lifetime Data, John Wiley and Sons, 1982 (equation 3.2.7 (page 108).

See Also

power.t.test, power.2surv.test, pwr.p.test

Examples

##
#pw = power.surv.test(n = 75, s0 = 0.83, s1 = 0.92, sig.level = 0.1)
#pw = power.surv.test(n = 75, s0 = 0.83, power = 0.8, followup = 3.08, sig.level = 0.1)

pw = power.surv.test(power = 0.8, s0 = 0.83, s1 = 0.92, followup = 3, sig.level = 0.1)
print(pw, digits = 4)

statapps/power.ctepd documentation built on April 26, 2024, 3:22 a.m.