FAQ/power/hazNR - CBU statistics Wiki
location: FAQ / power / hazNR

Computation of power analysis for a Cox Regression estimate pertaining to a continuous covariate

The powerEpiCont function is located in the powerSurvEpi library which will need loading into your R session. The below is a reproduction of the details given here.

The Hazard ratio, for a continous covariate, could compare hazard rates at one sd above the mean to the hazard rate at the mean.

Examples
  # example in the EXAMPLE section (page 557) of Hsieh and Lavori (2000).
  # Hsieh and Lavori (2000) assumed one-sided test, 
  # while this implementation assumed two-sided test. 
  # Hence alpha=0.1 here (two-sided test) will correspond
  # to alpha=0.05 of one-sided test in Hsieh and Lavori's (2000) example.
  powerEpiCont.default(n = 107, theta = exp(1), sigma2 = 0.3126^2, 
    psi = 0.738, rho2 = 0.1837, alpha = 0.1)

Results from using in a R session are below:

R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(powerSurvEpi)
> png(filename="powerEpiCont.default_%03d_med.png", width=480, height=480)
> ### Name: powerEpiCont.default
> ### Title: Power Calculation for Cox Proportional Hazards Regression with
> ###   nonbinary covariates for Epidemiological Studies
> ### Aliases: powerEpiCont.default
> ### Keywords: survival design
> 
> ### ** Examples
> 
>   # example in the EXAMPLE section (page 557) of Hsieh and Lavori (2000).
>   # Hsieh and Lavori (2000) assumed one-sided test, 
>   # while this implementation assumed two-sided test. 
>   # Hence alpha=0.1 here (two-sided test) will correspond
>   # to alpha=0.05 of one-sided test in Hsieh and Lavori's (2000) example.
>   powerEpiCont.default(n = 107, theta = exp(1), sigma2 = 0.3126^2, 
+     psi = 0.738, rho2 = 0.1837, alpha = 0.1)
[1] 0.8064577
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
> 
> 

None: FAQ/power/hazNR (last edited 2013-03-08 10:17:10 by localhost)