basiSet.mag: Function to obtain the union basis set of a Mixed Acyclic...

View source: R/basiSet.mag.R View source: R/DAG.To.MAG.R

basiSet.magR Documentation

Function to obtain the union basis set of a Mixed Acyclic Graph (MAG)

Description

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.

Usage

basiSet.mag(cgraph)

Arguments

cgraph

a matrix holding the Mixed Acyclic Graph, having edges of 0–>1, 100<–>100 or 10–10

Details

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.

Value

The union basis set is printed to the screen and is output from this function as a list.

Author(s)

Bill Shipley

References

Shipley, B. & Douma, J. Testing piecewise structural equations models in the presence of latent variables, including correlated errors.

See Also

dsep.test, DAG.to.MAG, DAG

Examples

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)

BillShipley/CauseAndCorrelation documentation built on Jan. 31, 2023, 4:20 a.m.