plot_model | R Documentation |
If confounds are indicated (provided in attr(model$P, 'confounds')
),
then these are represented as bidirectional arcs. Builds on functionality
from ggdag and dagitty.
plot_model(
model = NULL,
x_coord = NULL,
y_coord = NULL,
title = "",
textcol = "white",
textsize = 3.88,
shape = 16,
nodecol = "black",
nodesize = 16
)
model |
A |
x_coord |
A vector of x coordinates for DAG nodes. If left empty, coordinates are randomly generated |
y_coord |
A vector of y coordinates for DAG nodes. If left empty, coordinates are randomly generated |
title |
String specifying title of graph |
textcol |
String specifying color of text labels |
textsize |
Numeric, size of text labels |
shape |
Indicates shape of node. Defaults to circular node. |
nodecol |
String indicating color of node that is accepted by ggplot's default palette |
nodesize |
Size of node. |
A DAG plot in ggplot style.
## Not run:
model <- make_model('X -> K -> Y; X <-> Y')
model |>
CausalQueries:::plot_model()
model |>
CausalQueries:::plot_model(
x_coord = 1:3,
y_coord = 1:3,
title = "Mixed text and math: $\\alpha^2 + \\Gamma$")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.