Description Usage Arguments Details Value Examples
Use this function to convert a causality.graph into a lavaan formula so you can fit the model to the data and assess the quality of the model from the graph.
1 |
cgraph |
A causality.graph to be turned into a lavaan formula |
currently, only DAGs are supported, though patterns and PDAGs with DAG extensions are accepted. Future work will inlcude PAGs, and including output from the FnFC family as a latent measurement model.
a lavaan
formula, or an error
1 2 3 4 | # turn the dag from Sachs(2009) DAG into a lavaan compatable formula
library(lavaan)
lavaan.forumula <- as.lavaan.formula(sachs.dag)
fit <- cfa(lavaan.formula, data = sachs.df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.