DiscreteDistribution-class is the mother-class of the class LatticeDistribution.new("DiscreteDistribution", ...), but more
easily is the use of the generating function "DiscreteDistribution".
This generating function, from version 1.9 on, has been moved to this package from package distrEx.img"Reals": the space of the image of this distribution which has dimension 1
and the name "Real Space" param"Parameter": the parameter of this distribution, having only the
slot name "Parameter of a discrete distribution" r"function": generates random numbersd"function": density/probability functionp"function": cumulative distribution functionq"function": quantile function.withArith.withSim.logExact.lowerExactSymmetry"DistributionSymmetry";
used internally to avoid unnecessary calculations."UnivariateDistribution", directly.
Class "Distribution", by class "UnivariateDistribution".signature(.Object = "DiscreteDistribution"): initialize method signature(from = "DiscreteDistribution",
to = "LatticeDistribution"): coerce method to class "LatticeDistribution"
(checks if support is a lattice)signature(x = "DiscreteDistribution"): application of a mathematical function, e.g. sin or tan to this discrete distribution
abs: signature(x = "DiscreteDistribution"): exact image distribution of abs(x).
exp: signature(x = "DiscreteDistribution"): exact image distribution of exp(x).
sign: signature(x = "DiscreteDistribution"): exact image distribution of sign(x).
sqrt: signature(x = "DiscreteDistribution"): exact image distribution of sqrt(x).
log: signature(x = "DiscreteDistribution"): (with optional further argument base, defaulting to exp(1)) exact image distribution of log(x).
log10: signature(x = "DiscreteDistribution"): exact image distribution of log10(x).
gamma: signature(x = "DiscreteDistribution"): exact image distribution of gamma(x).
lgamma: signature(x = "DiscreteDistribution"): exact image distribution of lgamma(x).
digamma: signature(x = "DiscreteDistribution"): exact image distribution of digamma(x).
signature(e1 = "DiscreteDistribution"): application of `-' to this discrete distributionsignature(e1 = "DiscreteDistribution", e2 = "numeric"): multiplication of this discrete distribution
by an object of class `numeric'signature(e1 = "DiscreteDistribution", e2 = "numeric"): division of this discrete distribution
by an object of class `numeric'signature(e1 = "DiscreteDistribution", e2 = "numeric"): addition of this discrete distribution
to an object of class `numeric'signature(e1 = "DiscreteDistribution", e2 = "numeric"): subtraction of an object of class `numeric'
from this discrete distribution signature(e1 = "numeric", e2 = "DiscreteDistribution"): multiplication of this discrete distribution
by an object of class `numeric'signature(e1 = "numeric", e2 = "DiscreteDistribution"): addition of this discrete distribution
to an object of class `numeric'signature(e1 = "numeric", e2 = "DiscreteDistribution"): subtraction of this discrete distribution
from an object of class `numeric'signature(e1 = "DiscreteDistribution", e2 = "DiscreteDistribution"): Convolution of two discrete
distributions. The slots p, d and q are approximated on a common grid.signature(e1 = "DiscreteDistribution", e2 = "DiscreteDistribution"): Convolution of two discrete
distributions. The slots p, d and q are approximated on a common grid.signature(object = "DiscreteDistribution"): returns the supportsignature(object = "DiscreteDistribution"): returns the
left continuous cumulative distribution function, i.e.;
$p.l(t) = P(object < t)$ signature(object = "DiscreteDistribution"): returns the
right-continuous quantile function, i.e.;
$q.r(s)=sup{t|P(object>=t)<=s}$< dd=""> signature(object = "DiscreteDistribution"): plots density, cumulative distribution and quantile
function "AffLinDiscreteDistribution" which has extra slots
a, b (both of class "numeric"), and X0
(of class "DiscreteDistribution"), 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 = "DiscreteDistribution")signature(e1 = "DiscreteDistribution", e2 = "numeric")signature(e1 = "DiscreteDistribution", e2 = "numeric")signature(e1 = "DiscreteDistribution", e2 = "numeric")signature(e1 = "DiscreteDistribution", e2 = "numeric")signature(e1 = "numeric", e2 = "DiscreteDistribution")signature(e1 = "numeric", e2 = "DiscreteDistribution")signature(e1 = "numeric", e2 = "DiscreteDistribution")signature(e1 = "AffLinDiscreteDistribution")signature(e1 = "AffLinDiscreteDistribution", e2 = "numeric")signature(e1 = "AffLinDiscreteDistribution", e2 = "numeric")signature(e1 = "AffLinDiscreteDistribution", e2 = "numeric")signature(e1 = "AffLinDiscreteDistribution", e2 = "numeric")signature(e1 = "numeric", e2 = "AffLinDiscreteDistribution")signature(e1 = "numeric", e2 = "AffLinDiscreteDistribution")signature(e1 = "numeric", e2 = "AffLinDiscreteDistribution")"AffLinAbscontDistribution",
"AffLinDiscreteDistribution", "AffLinUnivarLebDecDistribution"
and called "AffLinDistribution"
which is used for functionals."AbscontDistribution",
"DiscreteDistribution", or "UnivarLebDecDistribution",
there is a class union of these classes called "AcDcLcDistribution";
in partiucalar methods for "*", "/",
"^" (see operators-methods) and methods
Minimum, Maximum, Truncate, and
Huberize, and convpow are defined for this
class union.Parameter-class
UnivariateDistribution-class
LatticeDistribution-class
AbscontDistribution-class
Reals-class
RtoDPQ.d
# Dirac-measure at 0
D1 <- DiscreteDistribution(supp = 0)
support(D1)
# simple discrete distribution
D2 <- DiscreteDistribution(supp = c(1:5), prob = c(0.1, 0.2, 0.3, 0.2, 0.2))
plot(D2)
(pp <- p(D2)(support(D2)))
p(D2)(support(D2)-1e-5)
p(D2)(support(D2)+1e-5)
p.l(D2)(support(D2))
p.l(D2)(support(D2)-1e-5)
p.l(D2)(support(D2)+1e-5)
q(D2)(pp)
q(D2)(pp-1e-5)
q(D2)(pp+1e-5)
q.r(D2)(pp)
q.r(D2)(pp-1e-5)
q.r(D2)(pp+1e-5)
Run the code above in your browser using DataLab