View source: R/basiSet.mag.R View source: R/DAG.To.MAG.R
basiSet.mag | R Documentation |
This function outputs the union basis set of a Mixed Acyclic Graph (MAG), as defined in Shipley, B. & Douma, J. Testing piecewise structural equations models in the presence of latent variables, including correlated errors. It is typically used along with the function DAG.to.MAG, which outputs the MAG.
basiSet.mag(cgraph)
cgraph |
a matrix holding the Mixed Acyclic Graph, having edges of 0–>1, 100<–>100 or 10–10 |
This function is typically called after the DAG.to.MAG function. The DAG.to.MAG function outputs the Mixed Acyclic Graph (MAG) as a matrix, which is then input into basiSet.MAG.
The union basis set is printed to the screen and is output from this function as a list.
Bill Shipley
Shipley, B. & Douma, J. Testing piecewise structural equations models in the presence of latent variables, including correlated errors.
dsep.test
, DAG.to.MAG
, DAG
library(ggm) dag1.ms<-DAG(X~A+L,Y~L,B~Y,order=T) #This is a call to the main function: DAG.to.MAG out1 <- DAG.to.MAG(full.DAG=dag1.ms,latents=c("L"),conditioning.latents = NULL) #This is a call to the function to output the union #basis set of a MAG basiSet.mag(out1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.