powerEpiInt {powerSurvEpi} | R Documentation |
Power Calculation Testing Interaction Effect for Cox Proportional Hazards Regression with two covariates for Epidemiological Studies (Both covariates should be binary)
Description
Power calculation testing interaction effect for Cox proportional hazards regression with two covariates for Epidemiological Studies. Both covariates should be binary variables. The formula takes into account the correlation between the two covariates. Some parameters will be estimated based on a pilot study.
Usage
powerEpiInt(X1,
X2,
failureFlag,
n,
theta,
alpha = 0.05)
Arguments
X1 |
numeric. a |
X2 |
numeric. a |
failureFlag |
numeric.a |
n |
integer. total number of subjects. |
theta |
numeric. postulated hazard ratio. |
alpha |
numeric. type I error rate. |
Details
This is an implementation of the power calculation formula derived by Schmoor et al. (2000) for the following Cox proportional hazards regression in the epidemoilogical studies:
where both covariates and
are binary variables.
Suppose we want to check if
the hazard ratio of the interaction effect to
is equal to
or is equal to
.
Given the type I error rate
for a two-sided test, the power
required to detect a hazard ratio as small as
is:
where is the
-th percentile of the standard normal distribution,
is the proportion of subjects died of
the disease of interest, and
,
,
,
.
,
,
,
, and
will be
estimated from the pilot data.
Value
power |
the power of the test. |
p |
estimated |
q |
estimated |
p0 |
estimated |
p1 |
estimated |
rho2 |
square of the estimated |
G |
a factor adjusting the sample size. The sample size needed to
detect an effect of a prognostic factor with given error probabilities has
to be multiplied by the factor |
mya |
estimated number of subjects taking values |
myb |
estimated number of subjects taking values |
myc |
estimated number of subjects taking values |
myd |
estimated number of subjects taking values |
psi |
proportion of subjects died of the disease of interest. |
References
Schmoor C., Sauerbrei W., and Schumacher M. (2000). Sample size considerations for the evaluation of prognostic factors in survival analysis. Statistics in Medicine. 19:441-452.
See Also
powerEpiInt.default0
, powerEpiInt2
Examples
# generate a toy pilot data set
X1 <- c(rep(1, 39), rep(0, 61))
set.seed(123456)
X2 <- sample(c(0, 1), 100, replace = TRUE)
failureFlag <- sample(c(0, 1), 100, prob = c(0.25, 0.75), replace = TRUE)
powerEpiInt(X1 = X1,
X2 = X2,
failureFlag = failureFlag,
n = 184,
theta = 3,
alpha = 0.05)