Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

UnivarMixingDistribution

Generating function for Class "UnivarMixingDistribution"


Description

Generates an object of class "UnivarMixingDistribution".

Usage

UnivarMixingDistribution(..., Dlist, mixCoeff, 
                                withSimplify = getdistrOption("simplifyD"))

Arguments

...

Objects of class "UnivariateDistribution" (or subclasses)

Dlist

an optional list or object of class "UnivarDistrList"; if not missing it is appended to argument ...; this way UnivarMixingDistribution may also be called with a list (or "UnivarDistrList"-object) as argument as suggested in an e-mail by Krunoslav Sever (thank you!)

mixCoeff

Objects of class "numeric" : a vector of probabilities for the mixing components (must be of same length as arguments in ...).

withSimplify

"logical": shall the return value be piped through a call to simplifyD?

Details

If mixCoeff is missing, all elements in ... are equally weighted.

Value

Object of class "UnivarMixingDistribution", or if argument withSimplify is TRUE and the resulting object would have one mixing component with probability (almost) 1, UnivarMixingDistribution will return this component.

Author(s)

See Also

Examples

mylist <- UnivarMixingDistribution(Binom(3,.3), Dirac(2), Norm(), 
          mixCoeff=c(1/4,1/5,11/20))

distr

Object Oriented Implementation of Distributions

v2.8.0
LGPL-3
Authors
Florian Camphausen [ctb] (contributed as student in the initial phase --2005), Matthias Kohl [aut, cph], Peter Ruckdeschel [cre, cph], Thomas Stabla [ctb] (contributed as student in the initial phase --2005), R Core Team [ctb, cph] (for source file ks.c/ routines 'pKS2' and 'pKolmogorov2x')
Initial release
2019-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.