dag_system | R Documentation |
Create and run structural equation model using formulas for each node.
dag_system(..., seed = NULL)
... |
Formulas specifying the model. |
seed |
an optional random seed for use in |
starter |
an optional data frame defining exogenous values of the variables in the formulas. |
There cannot be any cycles in the DAG (as the name DAG indicates.)
You can use uniform()
, gaussian()
, discrete()
, or toss_up
as random inputs. They correspond
respectively to runif
, rnorm
, sample
, and Bernouilli trials.
dag <- dag_system(A ~ uniform(), B ~ 3 + 10*A) dag_simulate(dag, n = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.