Learn R Programming

powerMediation (version 0.3.4)

powerPoisson: Power calculation for simple Poisson regression

Description

Power calculation for simple Poisson regression. Assume the predictor is normally distributed.

Usage

powerPoisson(
    beta0, 
    beta1, 
    mu.x1, 
    sigma2.x1, 
    mu.T = 1, 
    phi = 1, 
    alpha = 0.05, 
    N = 50)

Arguments

beta0

intercept

beta1

slope

mu.x1

mean of the predictor

sigma2.x1

variance of the predictor

mu.T

mean exposure time

phi

a measure of over-dispersion

alpha

type I error rate

N

toal sample size

Value

power

Details

The simple Poisson regression has the following form: $$ Pr(Y_i = y_i | \mu_i, t_i) = \exp(-\mu_i t_i) (\mu_i t_i)^{y_i}/ (y_i!) $$ where $$ \mu_i=\exp(\beta_0+\beta_1 x_{1i}) $$ We are interested in testing the null hypothesis \(\beta_1=0\) versus the alternative hypothesis \(\beta_1 = \theta_1\). Assume \(x_{1}\) is normally distributed with mean \(\mu_{x_1}\) and variance \(\sigma^2_{x_1}\). The sample size calculation formula derived by Signorini (1991) is $$ N=\phi\frac{\left[z_{1-\alpha/2}\sqrt{V\left(b_1 | \beta_1=0\right)} +z_{power}\sqrt{V\left(b_1 | \beta_1=\theta_1\right)}\right]^2} {\mu_T \exp(\beta_0) \theta_1^2} $$ where \(\phi\) is the over-dispersion parameter (\(=var(y_i)/mean(y_i)\)), \(\alpha\) is the type I error rate, \(b_1\) is the estimate of the slope \(\beta_1\), \(\beta_0\) is the intercept, \(\mu_T\) is the mean exposure time, \(z_{a}\) is the \(100*a\)-th lower percentile of the standard normal distribution, and \(V\left(b_1|\beta_1=\theta\right)\) is the variance of the estimate \(b_1\) given the true slope \(\beta_1=\theta\).

The variances are $$ V\left(b_1 | \beta_1 = 0\right)=\frac{1}{\sigma^2_{x_1}} $$ and $$ V\left(b_1 | \beta_1 = \theta_1\right)=\frac{1}{\sigma^2_{x_1}} \exp\left[-\left(\theta_1 \mu_{x_1} + \theta_1^2\sigma^2_{x_1}/2\right)\right] $$

References

Signorini D.F. (1991). Sample size for Poisson regression. Biometrika. Vol.78. no.2, pp. 446-50

See Also

See Also as sizePoisson

Examples

Run this code
# NOT RUN {
# power = 0.8090542
print(powerPoisson(
    beta0 = 0.1, 
    beta1 = 0.5, 
    mu.x1 = 0, 
    sigma2.x1 = 1, 
    mu.T = 1, 
    phi = 1, 
    alpha = 0.05, 
    N = 28))


# }

Run the code above in your browser using DataLab