rMM {MM} | R Documentation |
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 |
paras |
Parameters of the MM distribution; an object of class |
every |
Each row is recorded every |
burnin |
Number of initial observations to ignore |
start |
Observation to start simulation, with default |
Details
Function rMM()
uses standard Metropolis-Hastings simulation.
Function dMM()
is documented here for convenience; see
help(MM)
for related functionality.
Value
Returns a matrix with n
rows and length(paras)
columns.
Each row is an observation.
Author(s)
Robin K. S. Hankin
See Also
Examples
data(voting)
rMM(10,4,Lindsey(voting,voting_tally))
p <- paras(3)
theta(p) <- 2
dMM(1:3,p)