pwr_coxph: Calculate Power for Cox Regression Model

Description Usage Arguments Details Value References Examples

View source: R/pwr_coxph.R

Description

Compute power of Cox proportional hazards model or determine parameters to obtain target power.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pwr_coxph(
  hr = NULL,
  eventprob = NULL,
  n = NULL,
  rsquare = 0,
  stddev = 0.5,
  sig_level = 0.05,
  power = NULL,
  alternative = c("two.sided", "less", "greater")
)

Arguments

hr

Hazard ratio for a one unit increase in the predictor of interest

eventprob

Probability that an uncensored event occurs

n

Sample size

rsquare

The percent of variation in the predictor of interest explained by other covariates expected to be adjusted for in the Cox regression model (Default = 0)

stddev

Standard deviation of the predictor of interest (Default = 0.5)

sig_level

Significance level. (Default = 0.05)

power

Power of the test

alternative

Character. The alternative hypothesis of the test. Must be "two.sided" (Default), "greater", or "less"

Details

Exactly one of the parameters n or power must be passed as NULL – that parameter is determined from the others.

Value

Object of class "power.htest", a list containing the parameters specified as well as the one computed.

References

Hsieh, FY, and Philip W Lavori. 2000. "Sample-Size Calculations for the Cox Proportional Hazards Regression Model with Nonbinary Covariates." Controlled Clinical Trials 21 (6): 552–60.

Latouche, Aurélien, Raphaël Porcher, and Sylvie Chevret. 2004. "Sample Size Formula for Proportional Hazards Modelling of Competing Risks." Statistics in Medicine 23 (21): 3263–74.

Schoenfeld, David A. 1983. "Sample-Size Formula for the Proportional-Hazards Regression Model." Biometrics, 499–503.

Examples

1
2
3
4
5
## specify n to output the power
pwr_coxph(1.5, 0.8,  n = 80)

## specify power to output the sample size
pwr_coxph(1.5, 0.8, power = 0.8)

LucyMcGowan/survivalpwr documentation built on Dec. 17, 2021, 1:15 a.m.