coef_plot {phylopath} | R Documentation |
Plot path coefficients and their confidence intervals or standard errors.
Description
Plot path coefficients and their confidence intervals or standard errors.
Usage
coef_plot(
fitted_DAG,
error_bar = "ci",
order_by = "default",
from = NULL,
to = NULL,
reverse_order = FALSE
)
Arguments
fitted_DAG |
A fitted DAG, usually obtained by |
error_bar |
Whether to use confidence intervals ( |
order_by |
By |
from |
Only show path coefficients from these nodes. Supply as a character vector. |
to |
Only show path coefficients to these nodes. Supply as a character vector. |
reverse_order |
If |
Value
A ggplot
object.
Examples
d <- DAG(LS ~ BM, NL ~ BM, DD ~ NL + LS)
plot(d)
d_fitted <- est_DAG(d, rhino, rhino_tree, 'lambda')
plot(d_fitted)
coef_plot(d_fitted, error_bar = "se")
# to create a horizontal version, use this:
coef_plot(d_fitted, error_bar = "se", reverse_order = TRUE) + ggplot2::coord_flip()