moebius: Evaluate generalized Moebius parameters

moebiusR Documentation

Evaluate generalized Moebius parameters

Description

Given a full probability distribution over vertices of a graph, returns the value of the associated generalized Moebius parameters.

Usage

moebius(graph, ptable, dims = rep(2, n), r = TRUE)

Arguments

graph

An object of class mixedgraph, an ADMG.

ptable

An array containing a joint probability distribution over the vertices of graph.

dims

if ptable is not an array, gives dimensions of each vertex

r

logical - should recursive factorizations be used?

Value

An object of class mparams. That is, a list containing:

q

The Moebius parameters. q[[d]][[i]][[j]] is a numeric array containing values of P(X_H = x_H \,|\, X_T = j) for each x_H, where H is the ith head in district d, and j indexes the tail states x_T.

heads

List of lists, sorted by district, and each sub-list containing integer vectors of the heads in that district.

tails

List of lists, containing integer vectors of the tails corresponding to the heads above.

vnames

Vector of names of vertices in graph.

dim

Number of categories for each variable.

r

as input

Warning

This function does not verify that the given distribution satisfies the conditions of the model for the maps being calculated, and thus the distribution will not necessarily be recovered by mapping back using probdist.

Note this function will not generally return correct values for parameters in the recursive parametrization unless all variables are independent.

Author(s)

Robin Evans

References

Evans and Richardson (2010)

See Also

probdist.

Examples


data(gr2, package="MixedGraphs")

# distribution of complete independence
ptable = array(1/32, rep(2,5))
moebius(gr2, ptable, r=TRUE)


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