distrEx (version 2.6)

DiscreteMVDistribution-class: Discrete Multivariate Distributions

Description

The class of discrete multivariate distributions.

Arguments

Objects from the Class

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

Slots

img
Object of class "rSpace". Image space of the distribution. Usually an object of class "EuclideanSpace".
param
Object of class "OptionalParameter". Optional parameter of the multivariate distribution.
r
Object of class "function": generates (pseudo-)random numbers
d
Object of class "OptionalFunction": optional density function
p
Object of class "OptionalFunction": optional cumulative distribution function
q
Object of class "OptionalFunction": optional quantile function
support
numeric matrix whose rows form the support of the distribution
.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

Extends

Class "MultivariateDistribution", directly. Class "Distribution", by class "MultivariateDistribution".

Methods

support
signature(object = "DiscreteMVDistribution"): accessor function for slot support.

See Also

Distribution-class, MultivariateDistribution-class, DiscreteMVDistribution, E-methods

Examples

Run this code
(D1 <- new("MultivariateDistribution")) # Dirac measure in (0,0)
r(D1)(5)

(D2 <- DiscreteMVDistribution(supp = matrix(c(1:5, rep(3, 5)), ncol=2, byrow=TRUE)))
support(D2)
r(D2)(10)
d(D2)(support(D2))
p(D2)(lower = c(1,1), upper = c(3,3))
q(D2)
param(D2)
img(D2)

e1 <- E(D2) # expectation

Run the code above in your browser using DataLab