The function provides estimate of sample size for given power when there is over-dispersion. The data is simulated from Poisson distribution.

1 | ```
poiss.samp(power, lambda1, k, alpha, seed, numsim, sig)
``` |

`power` |
A vector of values between 0 and 1 representing desired power. |

`lambda1` |
Mean count under the null distribution. It can be a vector. |

`k` |
Fold change desired under the alternative distribution. It can be a vector. |

`alpha` |
Type I error rate: a value between 0 and 1. It can be a vector. |

`seed` |
Value of seed to ensure reproducibility of results. |

`numsim` |
Number of simulations. 1000 is recommended. |

`sig` |
Number of significant digits after decimal. |

The test statistic used is the scaled difference. Please contact the authors for more details on algorithm.

` Power.Expected ` |
Desired Power. |

` Mean.Null ` |
Mean Count under Null distribution. |

` Effect.Size ` |
Fold Change Under the alternate hypothesis. |

` N.est ` |
Estimated sample size. |

` Power.est ` |
Estimated Power. |

` Std.Err ` |
Standard Error. |

None

Milan Bimali

None

rpois

1 2 3 4 5 6 7 8 9 | ```
power = c(0.7,0.8);lambda1=3;k=seq(2,3,0.5);
alpha=0.01;seed = 20;numsim=100
sample.poiss <- poiss.samp(power,lambda1,k,alpha,seed,numsim)
sample.poiss
# Another example (takes longer to run)
#power = seq(0.7,0.9,0.05);lambda1=3;k=seq(2,3,0.5);
#alpha=0.005;seed = 20;numsim=1000
#sample.poiss <- poiss.samp(power,lambda1,k,alpha,seed,numsim)
#sample.poiss
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.