Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/functions_poisson.R

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

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)
``` |

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

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)]
*

total sample size

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.

Weiliang Qiu <[email protected]>

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

See Also as `powerPoisson`

1 2 3 4 5 6 7 8 9 10 | ```
# sample size = 28
print(sizePoisson(
beta0 = 0.1,
beta1 = 0.5,
mu.x1 = 0,
sigma2.x1 = 1,
mu.T = 1,
phi = 1,
alpha = 0.05,
power = 0.8))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.