disc: Class 'disc'

Description Usage Arguments Author(s) See Also Examples

Description

Class disc is used to represent an arbitrary univariate discrete distribution with a finite number of support points.

Function disc creates an object of class disc, given the support points and probability values at these points.

Function print.disc prints the discrete distribution.

Usage

1
2
3
disc(pt, pr=1)
## S3 method for class 'disc'
print(x, ...)

Arguments

pt

a numeric vector for support points.

pr

a numeric vector for probability values at the support points.

x

an object of class disc.

...

arguments passed on to function print.

Author(s)

Yong Wang <[email protected]>

See Also

cnm, cnmms.

Examples

1
(d = disc(pt=c(0,4), pr=c(0.3,0.7)))

nspmix documentation built on May 1, 2019, 6:38 p.m.