CompoundDistribution-class {distr}R Documentation

Class "CompoundDistribution"

Description

CompoundDistribution-class is a class to formalize compound distributions; it is a subclass to class UnivarMixingDistribution.

Objects from the Class

Objects can be created by calls of the form new("CompoundDistribution", ...). More frequently they are created via the generating function CompoundDistribution.

Slots

NumbOfSummandsDistr:
Object of class "DiscreteDistribution", the frequency distribution.
SummandsDistr:
Object of class "UnivDistrListOrDistribution", that is, either of class code{"UnivarDistrList"} (non i.i.d. case) or of class "UnivariateDistribution" (i.i.d. case); the summand distribution(s).
mixCoeff:
Object of class "numeric": a vector of probabilities for the mixing components.
mixDistr:
Object of class "UnivarDistrList": a list of univariate distributions containing the mixing components; must be of same length as mixCoeff.
img:
Object of class "Reals": the space of the image of this distribution which has dimension 1 and the name "Real Space"
param:
Object of class "Parameter": the parameter of this distribution, having only the slot name "Parameter of a discrete distribution"
r:
Object of class "function": generates random numbers
d:
fixed to NULL
p:
Object of class "function": cumulative distribution function
q:
Object of class "function": quantile function
.withArith:
logical: used internally to issue warnings as to interpretation of arithmetics
.withSim:
logical: used internally to issue warnings as to accuracy

Extends

Class "UnivarMixingDistribution" class "UnivarDistribution" by class "UnivarMixingDistribution", class "Distribution" by class "UnivariateDistribution".

Methods

show
signature(object = "CompoundDistribution") prints the object
SummandsDistr
signature(object = "CompoundDistribution") returns the corresponding slot
NumbOfSummandsDistr
signature(object = "CompoundDistribution") returns the corresponding slot

setAs relations

There is a coerce method to coerce objects of class "CompoundDistribution" to class UnivarLebDecDistribution; this is done by a simple call to simplifyD.

Author(s)

Peter Ruckdeschel Peter.Ruckdeschel@itwm.fraunhofer.de

See Also

Parameter-class, UnivariateDistribution-class, LatticeDistribution-class, AbscontDistribution-class, simplifyD, flat.mix

Examples

CP <- CompoundDistribution(Pois(),Norm())
CP
p(CP)(0.3)          
plot(CP)

[Package distr version 2.1.1 Index]