dist_mixture function

Mixture distribution

Mixture distribution

Parameters of mixing components can be overridden with with_params = list(dists = list(..., ..., ...)). #' Mixing probabilites can be overridden with with_params = list(probs = list(..., ..., ...)). The number of components cannot be overridden.

dist_mixture(dists = list(), probs = NULL)

Arguments

  • dists: A list of mixing distributions. May contain placeholders and duplicates.
  • probs: A list of mixing probabilities with the same length as dists. They are normalized to sum to one and NULL can be used as a placeholder within probs. To reduce the number of required parameters, probs should at least be partly specified (probs = list(NULL, NULL, ..., 1) with k - 1 NULLs where k is the number of mixing components).

Returns

A MixtureDistribution object.

Details

Does not support the quantile() capability!

Examples

# A complicated way to define a uniform distribution on \[0, 2\] dist_mixture( dists = list( dist_uniform(min = 0, max = 1), dist_uniform(min = 1, max = 2) ), probs = list(0.5, 0.5) )

See Also

Other Distributions: Distribution, dist_bdegp(), dist_beta(), dist_binomial(), dist_blended(), dist_dirac(), dist_discrete(), dist_empirical(), dist_erlangmix(), dist_exponential(), dist_gamma(), dist_genpareto(), dist_lognormal(), dist_negbinomial(), dist_normal(), dist_pareto(), dist_poisson(), dist_translate(), dist_trunc(), dist_uniform(), dist_weibull()