Description Usage Arguments Details Value See Also Examples
Function for generating a random sample of size n
, distributed according to a mixture specified as Mix
object. Returns an object of class rMix
.
1 2 3 4 5 6 |
n |
integer specifying the number of observations. |
obj |
object of class |
x |
|
... |
further arguments passed to the print method. |
For a mixture of p components, generates the number of observations in each component as multinomial, and then use an implemented random variate generation function for each component. The integer (multinomial) numbers are generated via sample
.
An object of class rMix
with the following attributes (for further explanations see Mix
):
name |
name of the |
dist |
character string stating the (abbreviated) name of the component distribution, such that the function |
discrete |
logical flag indicating whether the underlying mixture distribution is discrete. |
theta.list |
named list specifying the parameter values of the p components. |
w |
numeric vector of length p specifying the mixture weights w[i] of the components, i = 1,…,p. |
indices |
numeric vector of length |
dMix
for the density, Mix
for the construction of Mix
objects and plot.rMix
for the plot method.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.