50% off: Unlimited data and AI learning.
The Learning Leader's Guide to AI Literacy

powerSurvEpi (version 0.1.3)

ssizeEpi.default: Sample Size Calculation for Cox Proportional Hazards Regression

Description

Sample size calculation for Cox proportional hazards regression with two covariates for Epidemiological Studies. The covariate of interest should be a binary variable. The other covariate can be either binary or non-binary. The formula takes into account competing risks and the correlation between the two covariates.

Usage

ssizeEpi.default(power, 
		 theta, 
		 p, 
		 psi, 
		 rho2, 
		 alpha = 0.05)

Arguments

power

numeric. postulated power.

theta

numeric. postulated hazard ratio.

p

numeric. proportion of subjects taking value one for the covariate of interest.

psi

numeric. proportion of subjects died of the disease of interest.

rho2

numeric. square of the correlation between the covariate of interest and the other covariate.

alpha

numeric. type I error rate.

Value

The required sample size to achieve the specified power with the given type I error rate.

Details

This is an implementation of the sample size formula derived by Latouche et al. (2004) for the following Cox proportional hazards regression in the epidemiological studies: h(t|x1,x2)=h0(t)exp(β1x1+β2x2), where the covariate X1 is of our interest. The covariate X1 has to be a binary variable taking two possible values: zero and one, while the covariate X2 can be binary or continuous.

Suppose we want to check if the hazard of X1=1 is equal to the hazard of X1=0 or not. Equivalently, we want to check if the hazard ratio of X1=1 to X1=0 is equal to 1 or is equal to exp(β1)=θ. Given the type I error rate α for a two-sided test, the total number of subjects required to achieve a power of 1β is n=(z1α/2+z1β)2[log(θ)]2p(1p)ψ(1ρ2), where za is the 100a-th percentile of the standard normal distribution, ψ is the proportion of subjects died of the disease of interest, and ρ=corr(X1,X2)=(p1p0)×q(1q)p(1p), and p=Pr(X1=1), q=Pr(X2=1), p0=Pr(X1=1|X2=0), and p1=Pr(X1=1|X2=1).

References

Schoenfeld DA. (1983). Sample-size formula for the proportional-hazards regression model. Biometrics. 39:499-503.

Latouche A., Porcher R. and Chevret S. (2004). Sample size formula for proportional hazards modelling of competing risks. Statistics in Medicine. 23:3263-3274.

See Also

ssizeEpi

Examples

Run this code
# NOT RUN {
  # Examples at the end of Section 5.2 of Latouche et al. (2004)
  # for a cohort study.
  ssizeEpi.default(power = 0.80, 
		   theta = 2, 
		   p = 0.39, 
		   psi = 0.505,
                   rho2 = 0.132^2, 
		   alpha = 0.05)
# }

Run the code above in your browser using DataLab