sample.plot: Provides plot of Estimated sample size vs power

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

View source: R/sample.plot.R

Description

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.

Usage

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

Arguments

fit

Function used to estimate the sample size. See example.

ylim

Limits of y-axis

cutoff

Cutoff value for power

Details

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.

Note

None

Author(s)

Milan Bimali

References

None

See Also

xyplot

Examples

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

RSPS documentation built on May 1, 2019, 10:17 p.m.