# sizePoisson: Sample size calculation for simple Poisson regression In powerMediation: Power/Sample Size Calculation for Mediation Analysis

## Description

Sample size calculation for simple Poisson regression. Assume the predictor is normally distributed. Two-sided test is used.

## Usage

 1 2 3 4 5 6 7 8 9 sizePoisson( beta0, beta1, mu.x1, sigma2.x1, mu.T = 1, phi = 1, alpha = 0.05, power = 0.8)

## 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 power 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{[z_{1-alpha/2}sqrt{V(b_1 | beta_1=0)} +z_{power}sqrt{V(b_1 | beta_1=theta_1)}]^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(b_1|beta_1=theta) is the variance of the estimate b_1 given the true slope beta_1=theta.

The variances are

V(b_1 | beta_1 = 0)=1/{sigma^2_{x_1}}

and

V(b_1 | beta_1 = theta_1)=1/{sigma^2_{x_1}} exp[-(theta_1 mu_{x_1} + theta_1^2sigma^2_{x_1}/2)]

## Value

total sample size

## 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

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