Learn R Programming

distr (version 2.9.5)

CompoundDistribution-class: Class "CompoundDistribution"

Description

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

Arguments

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 "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

.logExact

logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function

.lowerExact

logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function

Symmetry

object of class "DistributionSymmetry"; used internally to avoid unnecessary calculations.

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

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de

See Also

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

Examples

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

Run the code above in your browser using DataLab