Description Usage Arguments Details Value See Also Examples
Simulate one or more data sets from a db or beta binomial
distribution. The parameters of the distribution may be
equal to those obtained from fitting the distibution to data,
using mleDb()
or mleBb()
. They may also be
specified by the user via the function makeDbdpars()
or makeBbdpars()
.
1 2 3 4 5 6 7 8 9 10 11 12 | ## S3 method for class 'mleDb'
simulate(object, nsim = 1, seed = NULL, ...,
ndata = NULL, drop = TRUE)
## S3 method for class 'mleBb'
simulate(object, nsim = 1, seed = NULL, ...,
ndata = NULL, drop = TRUE)
## S3 method for class 'Dbdpars'
simulate(object, nsim = 1, seed = NULL, ...,
ndata = NULL, drop = TRUE)
## S3 method for class 'Dbdpars'
simulate(object, nsim = 1, seed = NULL, ...,
ndata = NULL, drop = TRUE)
|
object |
An object of class |
nsim |
The number of data sets to simulate. |
seed |
Integer vector of seeds for random number generation. It should
be of length either 1 or |
... |
Not used. |
ndata |
Integer vector specifying the lengths of the data sets to
be simulated. If it is of length less than |
drop |
Logical scalar; if |
The actual simulation is done by rdb()
or by the
rbetabinom()
function from the rmutil
package.
A list, of length nsim
, whose entries are integer
vectors, the length of of the i
th entry being equal to
ndata[i]
. Each entry has an attribute "seed"
which
is the random number generation seed that was used in the generation
of the data in that entry. If nsim==1
and if drop
is
TRUE
, then the value is simply an integer vector
(of length ndata[1]
).
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.