powerLogisticCon {powerMediation}R Documentation

Calculating power for simple logistic regression with continuous predictor

Description

Calculating power for simple logistic regression with continuous predictor.

Usage

powerLogisticCon(n, 
                 p1, 
                 OR, 
                 alpha = 0.05)

Arguments

n

total sample size.

p1

the event rate at the mean of the continuous predictor XX in logistic regression logit(p)=a+bXlogit(p) = a + b X.

OR

Expected odds ratio. log(OR)\log(OR) is the change in log odds for the difference between at the mean of XX and at one SD above the mean.

alpha

Type I error rate.

Details

The logistic regression mode is

log(p/(1p))=β0+β1X \log(p/(1-p)) = \beta_0 + \beta_1 X

where p=prob(Y=1)p=prob(Y=1), XX is the continuous predictor, and log(OR)\log(OR) is the the change in log odds for the difference between at the mean of XX and at one SD above the mean. The sample size formula we used for testing if β1=0\beta_1=0 or equivalently OR=1OR=1, is Formula (1) in Hsieh et al. (1998):

n=(Z1α/2+Zpower)2/[p1(1p1)[log(OR)]2] n=(Z_{1-\alpha/2} + Z_{power})^2/[ p_1 (1-p_1) [log(OR)]^2 ]

where nn is the required total sample size, OROR is the odds ratio to be tested, p1p_1 is the event rate at the mean of the predictor XX, and ZuZ_u is the uu-th percentile of the standard normal distribution.

Value

Estimated power.

Note

The test is a two-sided test. For one-sided tests, please double the significance level. For example, you can set alpha=0.10 to obtain one-sided test at 5% significance level.

Author(s)

Weiliang Qiu stwxq@channing.harvard.edu

References

Hsieh, FY, Bloch, DA, and Larsen, MD. A SIMPLE METHOD OF SAMPLE SIZE CALCULATION FOR LINEAR AND LOGISTIC REGRESSION. Statistics in Medicine. 1998; 17:1623-1634.

See Also

SSizeLogisticCon

Examples

    ## Example in Table II Design (Balanced design (1)) of Hsieh et al. (1998 )
    ## the power is 0.95
    powerLogisticCon(n=317, p1=0.5, OR=exp(0.405), alpha=0.05)

[Package powerMediation version 0.3.4 Index]