negbin.pow: Estimates power for given sample size using simulation from...

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

Description

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

Usage

1
negbin.pow(n, lambda1, k, disp, alpha, seed, numsim, monitor, sig)

Arguments

n

A vector of positive integers representing the sample size

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.

disp

The over-dispersion parameter. 1 represent no pver-dispersion and values above one represent over-dispersion.

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.

monitor

If TRUE, it allows us to view the progress of the function.

sig

Number of significant digits after decimal.

Details

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

Value

Mean.Null

Mean Count under Null distribution.

Effect.Size

Fold Change Under the alternate hypothesis.

Disp.Par

Over-dispersion parameter.

Power

Estimated Power.

Std.Err

Standard Error.

Note

The alternative ecological parameterization is used for Negative binomial distribution.

Author(s)

Milan Bimali

References

None

See Also

rnbinom

Examples

1
2
3
4
5
6
7
8
9
power.negbin <- negbin.pow(n=c(5,10),lambda1=c(3,5),
k=c(2,3),disp=2,alpha=0.001,seed = 20,
numsim=100,monitor=TRUE)
power.plot(power.negbin)
# Another example (takes longer to run)
#power.negbin <- negbin.pow(n=c(3,5,10,15),lambda1=c(3,5),
#k=c(2,2.5,3),disp=2,alpha=0.001,seed = 20,
#numsim=1000,monitor=TRUE)
#head(power.negbin)


Search within the RSPS package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? 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.