rprobMat {contingency}R Documentation

Generate matrix of (conditional) probability distributions

Description

Generates discrete probability distributions in a matrix.

Usage

rprobMat(n, dim, d, alpha = 1)

rcondProbMat(n, dim, d, alpha = 1, condition)

Arguments

n

number of distributions

dim

dimension of contingency table for distributions

d

number of dimensions of table

alpha

parameter to use in dirichlet distribution

condition

which dimensions should be conditioned upon

Details

Returns an object of class tables consisting of discrete probability distributions. Each distribution is assumed to be a contingency table of dimension dim, and the probabilities are generated using a Dirichlet distribution with parameters all equal to alpha.

Value

A tables object containing random distributions.

Functions

Examples

dat <- rprobMat(10, c(2,2,2))


[Package contingency version 0.0.10 Index]