graphModel | R Documentation |
Obtaining the graphical causal model (GCM)
graphModel(adj.mat, cfd.mat = NULL, res.vars = NULL)
adj.mat |
Matrix of class |
cfd.mat |
Symmetric matrix of class |
res.vars |
A vector of class |
An object of class igraph
, containing the causal graphical,
with directed and bidirected edges.
adj.mat <- cfd.mat <- array(0L, dim = c(3, 3))
colnames(adj.mat) <- rownames(adj.mat) <-
colnames(cfd.mat) <- rownames(cfd.mat) <- c("A", "X", "Y")
adj.mat["A", "X"] <- adj.mat["X", "Y"] <-
cfd.mat["X", "Y"] <- cfd.mat["Y", "X"] <- 1L
gcm <- graphModel(adj.mat, cfd.mat, res.vars = "X")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.