prob_table: Constructs probability array for graph

View source: R/maps.R

prob_tableR Documentation

Constructs probability array for graph

Description

Put joint probabilities in an array with labelled dimensions.

Usage

prob_table(graph, dims = rep(2, n), values = 1/prod(dims))

Arguments

graph

An ADMG, object of class mixedgraph.

dims

An integer vector with same length as graph$v containing the number of categories take by each random variable.

values

A vector of joint probabilities of length prod(dims).

Value

An array containing the probabilities with appropriately labelled dimensions.

Author(s)

Robin Evans

Examples


data(gr1, package="MixedGraphs")
prob_table(gr1)


rje42/ADMGs2 documentation built on Sept. 3, 2024, 7:39 p.m.