pmf: Informal class to hold a probability mass function

pmfR Documentation

Informal class to hold a probability mass function

Description

A constructor function for objects of class pmf, either from the values and associated probability mass or from a sample of the desired distribution.

Usage

pmf(x = NULL, value, prob)

Arguments

x

a numeric vector. This optional argument is used to compute a pmf from a sample, in which case this should be the only argument.

value

a numeric vector containing the possible values within the pmf support range.

prob

a numeric vector containing the probability mass associated with each value.

Value

a list with $value and $prob of class pmf.


rmvegasm/schron documentation built on June 3, 2022, 7:14 a.m.