valid: Valid

Description Usage Arguments Value Examples

Description

Generic function to determine if the distribution is a valid probability distribution, i.e. if the support is not empty and at least one observation has been made.

Usage

1
valid(d)

Arguments

d

Dist object representing the distribution.

Value

Logical representing the validity of the distribution.

Examples

1
2
3
4
5
d <- Dist(5)
valid(d) # FALSE, support is empty

d <- Dist(c(0, 1, 0))
valid(d) # TRUE, at least one observation is made

ELIFE-ASU/rinform documentation built on May 26, 2019, 7:25 a.m.