UnivarLebDecDistributionclass {distr}  R Documentation 
Class "UnivarLebDecDistribution"
Description
UnivarLebDecDistribution
class is a class to formalize
a Lebesgue decomposed distribution with a discrete and an
absolutely continuous part; it is a subclass to
class UnivarMixingDistribution
.
Objects from the Class
Objects can be created by calls of the form
new("UnivarLebDecDistribution", ...)
.
More frequently they are created via the generating function
UnivarLebDecDistribution
.
Slots
mixCoeff
Object of class
"numeric"
: a vector of length 2 of probabilities for the respective a.c. and discrete part of the objectmixDistr
Object of class
"UnivarDistrList"
: a list of univariate distributions containing the a.c. and discrete components; must be of length 2; the first component must be of class"AbscontDistribution"
, the second of class"DiscreteDistribution"
.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 numbersd
fixed to
NULL
p
Object of class
"function"
: cumulative distribution functionq
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.support
numeric vector — the support slot of the discrete part
gaps
(numeric) matrix or
NULL
; — the gaps slot of the absolutely continuous part
Extends
Class "UnivarMixingDistribution"
, directly;
class "UnivariateDistribution"
by class "UnivarMixingDistribution"
class "Distribution"
by class "UnivariateDistribution"
.
Methods
 show
signature(object = "UnivarLebDecDistribution")
 plot
signature(object = "UnivarLebDecDistribution")
 acPart
signature(object = "UnivarLebDecDistribution")
 acPart<
signature(object = "UnivarLebDecDistribution")
 discretePart
signature(object = "UnivarLebDecDistribution")
 discretePart<
signature(object = "UnivarLebDecDistribution")
 acWeight
signature(object = "UnivarLebDecDistribution")
 acWeight<
signature(object = "UnivarLebDecDistribution")
 discreteWeight
signature(object = "UnivarLebDecDistribution")
 discreteWeight<
signature(object = "UnivarLebDecDistribution")
 p.ac
signature(object = "UnivarLebDecDistribution")
accessor to slotp
ofacPart(object)
, possibly weighted byacWeight(object)
; it has an extra argumentCondOrAbs
with default value"cond"
which if it does not partially match (bypmatch
)"abs"
, returns exactly slotp
ofacPart(object)
else weighted byacWeight(object)
. d.ac
signature(object = "UnivarLebDecDistribution")
accessor to slotd
of the absolutely continuous part of the distribution, possibly weighted byacWeight(object)
; it has an extra argumentCondOrAbs
which acts as the one inp.ac
. q.ac
signature(object = "UnivarLebDecDistribution")
accessor to slotq
ofacPart(object)
. r.ac
signature(object = "UnivarLebDecDistribution")
accessor to slotq
ofacPart(object)
. p.discrete
signature(object = "UnivarLebDecDistribution")
accessor to slotp
ofdiscretePart(object)
, possibly weighted bydiscreteWeight(object)
; it has an extra argumentCondOrAbs
which acts as the one inp.ac
. d.discrete
signature(object = "UnivarLebDecDistribution")
accessor to slotd
ofdiscretePart(object)
, possibly weighted bydiscreteWeight(object)
; it has an extra argumentCondOrAbs
which acts as the one inp.ac
. q.discrete
signature(object = "UnivarLebDecDistribution")
accessor to slotq
ofdiscretePart(object)
. r.discrete
signature(object = "UnivarLebDecDistribution")
accessor to slotr
ofdiscretePart(object)
. coerce
signature(from = "AffLinUnivarLebDecDistribution", to = "UnivarLebDecDistribution")
: create a"UnivarLebDecDistribution"
object from a"AffLinUnivarLebDecDistribution"
object coerce
signature(from = "AbscontDistribution", to = "UnivarLebDecDistribution")
: create a"UnivarLebDecDistribution"
object from a"AbscontDistribution"
object coerce
signature(from = "DiscreteDistribution", to = "UnivarLebDecDistribution")
: create a"UnivarLebDecDistribution"
object from a"DiscreteDistribution"
object Math
signature(x = "UnivarLebDecDistribution")
: application of a mathematical function, e.g.sin
ortan
to this discrete distribution
abs
:signature(x = "UnivarLebDecDistribution")
: exact image distribution ofabs(x)
. 
exp
:signature(x = "UnivarLebDecDistribution")
: exact image distribution ofexp(x)
. 
sign
:signature(x = "UnivarLebDecDistribution")
: exact image distribution ofsign(x)
. 
sign
:signature(x = "AcDcLcDistribution")
: exact image distribution ofsign(x)
. 
sqrt
:signature(x = "AcDcLcDistribution")
: exact image distribution ofsqrt(x)
. 
log
:signature(x = "UnivarLebDecDistribution")
: (with optional further argumentbase
, defaulting toexp(1)
) exact image distribution oflog(x)
. 
log10
:signature(x = "UnivarLebDecDistribution")
: exact image distribution oflog10(x)
. 
sqrt
:signature(x = "UnivarLebDecDistribution")
: exact image distribution ofsqrt(x)
. 
sqrt
:signature(x = "AcDcLcDistribution")
: exact image distribution ofsqrt(x)
.

 
signature(e1 = "UnivarLebDecDistribution")
: application of ‘’ to this distribution *
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
: multiplication of this distribution by an object of class ‘numeric’ /
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
: division of this distribution by an object of class ‘numeric’ +
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
: addition of this distribution to an object of class ‘numeric’ 
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
: subtraction of an object of class ‘numeric’ from this distribution *
signature(e1 = "numeric", e2 = "UnivarLebDecDistribution")
: multiplication of this distribution by an object of class ‘numeric’ +
signature(e1 = "numeric", e2 = "UnivarLebDecDistribution")
: addition of this distribution to an object of class ‘numeric’ 
signature(e1 = "numeric", e2 = "UnivarLebDecDistribution")
: subtraction of this distribution from an object of class ‘numeric’ +
signature(e1 = "UnivarLebDecDistribution", e2 = "UnivarLebDecDistribution")
: Convolution of two Lebesgue decomposed distributions. Result is again of class"UnivarLebDecDistribution"
, but if optiongetdistrOption("withSimplify")
isTRUE
it is piped through a call tosimplifyD
, hence may also be of classAbscontDistribution
orDiscreteDistribution
.
 
signature(e1 = "UnivarLebDecDistribution", e2 = "UnivarLebDecDistribution")
: Convolution of two Lebesgue decomposed distributions. The same applies as for the preceding item.
Internal subclass "AffLinUnivarLebDecDistribution"
To enhance accuracy of several functionals on distributions,
mainly from package distrEx,
there is an internally used (but exported) subclass
"AffLinUnivarLebDecDistribution"
which has extra slots
a
, b
(both of class "numeric"
), and X0
(of class "UnivarLebDecDistribution"
), to capture the fact
that the object has the same distribution as a * X0 + b
. This is
the class of the return value of methods
 
signature(e1 = "UnivarLebDecDistribution")
 *
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
 /
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
 +
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
 
signature(e1 = "UnivarLebDecDistribution", e2 = "numeric")
 *
signature(e1 = "numeric", e2 = "UnivarLebDecDistribution")
 +
signature(e1 = "numeric", e2 = "UnivarLebDecDistribution")
 
signature(e1 = "numeric", e2 = "UnivarLebDecDistribution")
 
signature(e1 = "AffLinUnivarLebDecDistribution")
 *
signature(e1 = "AffLinUnivarLebDecDistribution", e2 = "numeric")
 /
signature(e1 = "AffLinUnivarLebDecDistribution", e2 = "numeric")
 +
signature(e1 = "AffLinUnivarLebDecDistribution", e2 = "numeric")
 
signature(e1 = "AffLinUnivarLebDecDistribution", e2 = "numeric")
 *
signature(e1 = "numeric", e2 = "AffLinUnivarLebDecDistribution")
 +
signature(e1 = "numeric", e2 = "AffLinUnivarLebDecDistribution")
 
signature(e1 = "numeric", e2 = "AffLinUnivarLebDecDistribution")
There also is a class union of "AffLinAbscontDistribution"
,
"AffLinDiscreteDistribution"
, "AffLinUnivarLebDecDistribution"
and called "AffLinDistribution"
which is used for functionals.
Internal virtual superclass "AcDcLcDistribution"
As many operations should be valid no matter whether the operands
are of class "AbscontDistribution"
,
"DiscreteDistribution"
, or "UnivarLebDecDistribution"
,
there is a class union of these classes called "AcDcLcDistribution"
;
in particular methods for "*"
, "/"
,
"^"
(see operatorsmethods) and methods
Minimum
, Maximum
, Truncate
, and
Huberize
, and convpow
are defined for this
class union.
Author(s)
Peter Ruckdeschel peter.ruckdeschel@unioldenburg.de
See Also
Parameterclass
UnivarMixingDistributionclass
DiscreteDistributionclass
AbscontDistributionclass
simplifyD
flat.LCD
Examples
wg < flat.mix(UnivarMixingDistribution(Unif(0,1),Unif(4,5),
withSimplify=FALSE))
myLC < UnivarLebDecDistribution(discretePart=Binom(3,.3), acPart = wg,
discreteWeight=.2)
myLC
p(myLC)(0.3)
r(myLC)(30)
q(myLC)(0.9)
## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
acPart(myLC)
plot(myLC)
d.discrete(myLC)(2)
p.ac(myLC)(0)
acWeight(myLC)
plot(acPart(myLC))
plot(discretePart(myLC))
gaps(myLC)
support(myLC)
plot(as(Norm(),"UnivarLebDecDistribution"))