Learn R Programming

convdistr (version 1.6.1)

new_MIXTURE: Mixture of DISTRIBUTION objects

Description

Produce a new distribution that obtain random drawns of the mixture of the DISTRIBUTION objects

Usage

new_MIXTURE(listdistr, mixture)

Value

an object of class MIXTURE, DISTRIBUTION

Arguments

listdistr

a list of DISTRIBUTION objects

mixture

a vector of probabilities to mixture the distributions. Must add 1 If missing the drawns are obtained from the distributions with the same probability

Author

John J. Aponte

Examples

Run this code
x1 <- new_NORMAL(0,1)
x2 <- new_NORMAL(4,1)
x3 <- new_NORMAL(6,1)
new_MIXTURE(list(x1,x2,x3))

Run the code above in your browser using DataLab