probspace: Probability Spaces

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Forms a probability space from a set of outcomes and (optional) vector of probabilities.

Usage

1
2
3
4
5
6
7
probspace(x, ...)

## Default S3 method:
probspace(x, probs, ...)

## S3 method for class 'list'
probspace(x, probs, ...)

Arguments

x

a vector, data frame, or list of outcomes.

probs

a vector of non-negative weights of the same length as outcomes

...

further arguments to be passed to or from other methods.

Details

The elements of probs will be normalized to ensure that their sum is one. If probs is not specified, then the equally likely model is assumed in which every outcome has the same probability.

Value

If outcomes is a vector or data frame, then the value is a data frame with an added probs column. If outcomes is a list, then the value is a list with components outcomes (the supplied list) and a probs component.

Author(s)

G. Jay Kerns gkerns@ysu.edu.

See Also

iidspace

Examples

1
2
R <- rolldie(3)
probspace(R)

GabauerDavid/WVPU documentation built on June 1, 2019, 3:52 a.m.