distr (version 2.6)

liesInSupport: Generic Function for Testing the Support of a Distribution

Description

The function tests if x lies in the support of the distribution object.

Usage

liesInSupport(object, x)

Arguments

object
object of class "Distribution"
x
numeric vector or matrix

Value

Methods

object = "DiscreteDistribution", x = "numeric":
does x lie in the support of object.
object = "DiscreteDistribution", x = "matrix":
does x lie in the support of object.
object = "AbscontDistribution", x = "numeric":
does x lie in the support of object.
object = "AbscontDistribution", x = "matrix":
does x lie in the support of object.

See Also

Distribution-class

Examples

Run this code
liesInSupport(Exp(1), rnorm(10))

# note
x <- rpois(10, lam = 10)
liesInSupport(Pois(1), x)
# better
distroptions("TruncQuantile"=1e-15)
liesInSupport(Pois(1), x)
distroptions("TruncQuantile"=1e-05) # default

Run the code above in your browser using DataLab