rMM: Random samples from the multiplicative multinomial
Description
Density, and random samples drawn from, the
multiplicative multinomial
Usage
rMM(n, Y, paras, burnin = 4*Y, every = 4*Y, start = NULL)
dMM(Y, paras)
Arguments
n
Number of observations to make
Y
Sum of each observation (for example, 100 for the pollen dataset,
4 for voting)
paras
Parameters of the MM distribution; an object of class paras
every
Each row is recorded every every steps through the Markov
chain. Thus every=10 means every tenth row is written to the
returned matrix during MH process (and the other nine
values are discarded)
burnin
Number of initial observations to ignore
start
Observation to start simulation, with default NULL
corresponding to using a random start vector
Value
Returns a matrix with n rows and length(paras) columns.
Each row is an observation.
Details
Function rMM() uses standard Metropolis-Hastings simulation.
Function dMM() is documented here for convenience; see
help(MM) for related functionality.