Description Usage Arguments Details Value Author(s) References See Also Examples
MAG
generates and plots maximal summary graphs after marginalization
and conditioning.
1 |
amat |
An adjacency matrix of a MAG, or a graph that can be a |
M |
A subset of the node set of |
C |
Another disjoint subset of the node set of |
showmat |
A logical value. |
plot |
A logical value, |
plotfun |
Function to plot the graph when |
... |
Further arguments passed to |
This function uses the functions SG
and Max
.
A matrix that consists 4 different integers as an ij-element: 0 for a missing edge between i and j, 1 for an arrow from i to j, 10 for a full line between i and j, and 100 for a bi-directed arrow between i and j. These numbers are added to be associated with multiple edges of different types. The matrix is symmetric w.r.t full lines and bi-directed arrows.
Kayvan Sadeghi
Richardson, T.S. and Spirtes, P. (2002). Ancestral graph Markov models. Annals of Statistics, 30(4), 962-1030.
Sadeghi, K. (2011). Stable classes of graphs containing directed acyclic graphs. Submitted.
Sadeghi, K. and Lauritzen, S.L. (2011). Markov properties for loopless mixed graphs. Submitted. URL http://arxiv.org/abs/1109.5909.
Wermuth, N. (2011). Probability distributions with summary graph structure. Bernoulli, 17(3), 845-879.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ex<-matrix(c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ##The adjacency matrix of a DAG
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,1,0,1,1,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0), 16, 16, byrow=TRUE)
M <- c(3,5,6,15,16)
C <- c(4,7)
MSG(ex,M,C,plot=TRUE)
###################################################
H<-matrix(c(0,100,1,0,100,0,100,0,0,100,0,100,0,1,100,0),4,4)
Max(H)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.