Description Usage Arguments Details Note Author(s) References See Also Examples
This function plots the estimate power vs sample size computed using function poiss.pow or negbin.pow for different fold changes. Please see example on how to use it.
1 | power.plot(fit, ylim = c(-0.05, 1.05), cutoff = 0.8)
|
fit |
Function used to estimate the power. See example. |
ylim |
Limits of y-axis |
cutoff |
Cutoff value for power |
This function can only be run if the function poiss.pow or negbin.pow 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 10 11 12 | #--------------------------------------------------
power.poiss <- poiss.pow(n=c(5,10,15),lambda1=c(3),k=c(2,2.5,3),
alpha=0.05,seed = 20,numsim=100,monitor=TRUE)
power.poiss
power.plot(power.poiss,cutoff=c(0.8,0.9))
# Another example (takes longer to run)
#power.poiss <- poiss.pow(n=c(3,5,10,15,20),lambda1=c(3),k=c(1.5,2,2.5,3),
#alpha=0.001,seed = 20,numsim=500,monitor=TRUE)
#power.plot(power.poiss,cutoff=c(0.8,0.9))
#power.negbin <- negbin.pow(n=c(3,5,10,15,20),lambda1=c(3,5),k=c(1.5,2,2.5,3,3.5),
#disp=2,alpha=0.001,seed = 20,numsim=1000,monitor=TRUE)
#power.plot(power.negbin,cutoff=0.8)
|
|
| | 0%
|
|======== | 11%
|
|================ | 22%
|
|======================= | 33%
|
|=============================== | 44%
|
|======================================= | 56%
|
|=============================================== | 67%
|
|====================================================== | 78%
|
|============================================================== | 89%
|
|======================================================================| 100%
N Mean.Null Effect.Size Type.I.Error Power Std.Err
1 5 3 2.0 0.05 0.66 0.047
2 10 3 2.0 0.05 0.94 0.024
3 15 3 2.0 0.05 0.99 0.010
4 5 3 2.5 0.05 0.93 0.026
5 10 3 2.5 0.05 0.99 0.010
6 15 3 2.5 0.05 1.00 0.000
7 5 3 3.0 0.05 0.98 0.014
8 10 3 3.0 0.05 1.00 0.000
9 15 3 3.0 0.05 1.00 0.000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.