probabilities of the components (or weights, will be normalized)
index
(optional) index random variable, giving the distribution of indices
components
a list of the component random variables
Value
A random variable.
Details
If an index is given, prob is ignored.
References
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations
Using Random Variable Objects. Technical report, Columbia University, New York.
comp <- list(rvnorm(mean=0), rvnorm(mean=10)) # Normal components of a mixture distribution rvmix(prob=c(95,5), components=comp) # 5 per cent comes from N(10,1)