Learn R Programming

bivariate (version 0.7.0)

14_PD_categorical: Categorical Distributions

Description

Bivariate categorical distributions.

Usage

gbvpmf (p)

Arguments

p

Numeric matrix of probabilities (or frequencies), preferably with row and column names.

Value

Self-referencing S4-based function objects.

Refer to Function Objects.

References

Refer to the vignette for an overview, references, theoretical background and better examples.

Note that the probhat package supports categorical distributions, and provides more tools.

See Also

Uniform For uniform distributions.

Binomial and Poisson For other probability distributions of discrete random variables.

Normal, Bimodal, Dirichlet and Nonparametric For other probability distributions of continuous random variables.

Main Plotting Functions

Density Matrices

Examples

Run this code
# NOT RUN {
library (barsurf)

h <- matrix (sample (1:24), 4, 6)
rownames (h) <- LETTERS [1:4]
colnames (h) <- letters [1:6]

f <- gbvpmf (h)

plot (f)
plot (f, FALSE)

h [2, 1:4] / sum (h)
f (2, 1:4)
f ("B", c ("a", "b", "c", "d") )
# }

Run the code above in your browser using DataLab