newSim | R Documentation |
Given an object that describes negative binomial distribution, simulate counts from the distribution.
newSim(object, seed, ...) ## S4 method for signature 'newmodel' newSim(object, seed)
object |
an object that describes a matrix of negative binomial. |
seed |
an optional integer to specify how the random number generator
should be initialized with a call to |
... |
additional arguments. |
A list with the following elements.
countsthe matrix with the simulated counts.
dataNBthe data simulated from the negative binomial.
dataDropoutsthe data simulated from the binomial process.
zeroFractionthe fraction of zeros.
newmodel
: simulate from a nb distribution.
a <- newmodel(n=5, J=10) newSim(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.