Class "LatticeDistribution"

Description

The LatticeDistribution-class is the mother-class of the
classes Binom, Dirac, Geom, Hyper, Nbinom and
Poisson. It formalizes a distribution on a regular affine
linear lattice.

Objects from the Class

The usual way to generate objects of class LatticeDistribution is to call
the generating function LatticeDistribution.
Somewhat more flexible, but also proner to inconsistencies is a call to
new("LatticeDistribution"), where you may explicitly specify random
number generator, (counting) density, cumulative distribution and quantile
functions. For conveniance, in this call to new("LatticeDistribution"),
an additional possibility is to only specify the random number generator. The
function RtoDPQ.d then approximates the three remaining slots d,
p and q by random sampling.

Slots

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

Object of class "function":
(counting) density/probability function

p

Object of class "function":
cumulative distribution function

q

Object of class "function":
quantile function

support

Object of class "numeric": a (sorted) vector
containing the support of the discrete
density function

lattice

Object of class "Lattice": the lattice
generating the support.

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

signature(from = "LatticeDistribution",
to = "DiscreteDistribution"): coerces an object from
"LatticeDistribution" to "DiscreteDistribution"
thereby cancelling out support points with probability 0.

Internal subclass "AffLinLatticeDistribution"

To enhance accuracy of several functionals on distributions,
mainly from package distrEx, there is an internally used
(but exported) subclass "AffLinLatticeDistribution" which has extra slots
a, b (both of class "numeric"), and X0
(of class "LatticeDistribution"), 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 = "LatticeDistribution")

*

signature(e1 = "LatticeDistribution", e2 = "numeric")

/

signature(e1 = "LatticeDistribution", e2 = "numeric")

+

signature(e1 = "LatticeDistribution", e2 = "numeric")

-

signature(e1 = "LatticeDistribution", e2 = "numeric")

*

signature(e1 = "numeric", e2 = "LatticeDistribution")

+

signature(e1 = "numeric", e2 = "LatticeDistribution")

-

signature(e1 = "numeric", e2 = "LatticeDistribution")

-

signature(e1 = "AffLinLatticeDistribution")

*

signature(e1 = "AffLinLatticeDistribution", e2 = "numeric")

/

signature(e1 = "AffLinLatticeDistribution", e2 = "numeric")

+

signature(e1 = "AffLinLatticeDistribution", e2 = "numeric")

-

signature(e1 = "AffLinLatticeDistribution", e2 = "numeric")

*

signature(e1 = "numeric", e2 = "AffLinLatticeDistribution")

+

signature(e1 = "numeric", e2 = "AffLinLatticeDistribution")

-

signature(e1 = "numeric", e2 = "AffLinLatticeDistribution")

There is also an explicit coerce-method from class
"AffLinLatticeDistribution" to class "AffLinDiscreteDistribution"
which cancels out support points with probability 0.

Note

Working with a computer, we use a finite interval as support which
carries at least mass 1-getdistrOption("TruncQuantile").