rmultinom.cg {lcd}R Documentation

Random multinomial sample from a chain graph

Description

Generates a desired number of multinomial random samples from a given chain graph structure and a sequence of compatible block-recursive conditional distributions.

Usage

rmultinom.cg(n, amat, distn)

Arguments

n the intended sample size, should be at least 1.
amat the adjacency matrix of a chain graph.
distn a sequence of block-recursive conditional distributions, e.g. the one returned by get.multinom.dist.

Value

An n by p matrix with each row corresponding to a random sample.

Author(s)

Zongming Ma and Xiangrui Meng

References

Cowell, R. G., Dawid, A. P., Lauritzen, S. L. and Spiegelhalter, D. J. (1999) Probabilistic Networks and Expert Systems. pp.77-79. Springer-Verlag, New York.


[Package lcd version 0.7-2 Index]