| multinom.gen | R Documentation |
These are built-in functions to be used by ran.CMData for generating
random multinomial data.
mg.Resample(n, clustersizes, param)
mg.DirMult(n, clustersizes, param)
mg.LogitNorm(n, clustersizes, param)
mg.MixMult(n, clustersizes, param)
n |
number of independent clusters to generate |
clustersizes |
an integer vector specifying the sizes of the clusters |
param |
a list of parameters for each specific generator |
For mg.Resample: the param list should be list(param=...), in which
the CMData object to be resampled is passed.
For mg.DirMult: the param list should be list(shape=...), in which
the parameter vector of the Dirichlet distribution is passed
(see rdirichlet).
For mg.LogitNorm: the param list should be list(mu=...,sigma=...),
in which the mean vector and covariance matrix of the underlying Normal distribution
are passed. If sigma is NULL (or missing), then an identity matrix is assumed.
They should have K-1 dimensions for a K-variate multinomial.
For mg.MixMult: the param list should be list(q=...,m=...),
in which the vector of mixture probabilities q and the matrix m
of logit-transformed means of each component are passed.
For a K-variate multinomial, the matrix m should have K-1 columns
and length(q) rows.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.