pwr_coxph.Rd
Compute power of Cox proportional hazards model or determine parameters to obtain target power.
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") )
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" |
Object of class "power.htest
", a list containing the parameters specified
as well as the one computed.
Exactly one of the parameters n
or power
must be passed as NULL
-- that
parameter is determined from the others.
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.
## specify n to output the power pwr_coxph(1.5, 0.8, n = 80)#> #> Cox Regression power calculation #> #> n = 80 #> nevents = 64 #> hr = 1.5 #> eventprob = 0.8 #> rsquare = 0 #> stddev = 0.5 #> sig_level = 0.05 #> power = 0.3678132 #> alternative = two.sided #>## specify power to output the sample size pwr_coxph(1.5, 0.8, power = 0.8)#> #> Cox Regression power calculation #> #> n = 238.7095 #> nevents = 190.9676 #> hr = 1.5 #> eventprob = 0.8 #> rsquare = 0 #> stddev = 0.5 #> sig_level = 0.05 #> power = 0.8 #> alternative = two.sided #>