This function plots the Estimated sample size vs power computed using function poiss.pow or negbin.pow for different fold changes. Please see example on how to use it.

1 | ```
sample.plot(fit, ylim = c(-0.05, 1.05), cutoff = 0.8)
``` |

`fit` |
Function used to estimate the sample size. See example. |

`ylim` |
Limits of y-axis |

`cutoff` |
Cutoff value for power |

This function can only be run if the function poiss.samp or negbin.samp has been used. If a vector of type I error, null count, and overdispersion (for negbin.pow) is provided the plot is based on the smalles of these values.

None

Milan Bimali

None

xyplot

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

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

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