View source: R/analyze-graph.R
plot.linearcausalproblem | R Documentation |
Plot the graph from the causal problem with a legend describing attributes
## S3 method for class 'linearcausalproblem'
plot(x, ...)
x |
object of class "linearcausalproblem" |
... |
Not used |
Nothing
plot_graphres which plots the graph only
b <- graph_from_literal(X -+ Y, Ur -+ X, Ur -+ Y)
V(b)$leftside <- c(0,0,0)
V(b)$latent <- c(0,0,1)
V(b)$nvals <- c(2,2,2)
V(b)$exposure <- c(1,0,0)
V(b)$outcome <- c(0,1,0)
E(b)$rlconnect <- c(0,0,0)
E(b)$edge.monotone <- c(0,0,0)
q <- "p{Y(X=1)=1}-p{Y(X=0)=1}"
obj <- analyze_graph(graph = b, constraints = NULL, effectt <- q)
plot(obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.