knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(ADMGs2)

Basics

ADMGs2 is a package that expands MixedGraphs to allow for fixed vertices. It also includes functions to compute intrisic sets, (recursive) heads and tails, and to fit models using the algorithm of Evans and Richardson (2010).

Loading it overrides the class of vertices to include a new fixed class. [But for some reason it doesn't show up here...]

vertexTypes()

Making Graphs

We can create ADMGs using graphCr():

gr <- graphCr("1 -> 2 <-> 4 <- 3 <- 2")
gr

To create a CADMG, we just need to fix a vertex.

fix(gr, 3)

Fitting models to data

We can use the twins data set as a toy example.

data(twins)
gr4 <- makeGraphCycle(4, type="bidirected")
summary(fitADMG(twins, graph=gr4))

References

Evans, R.J. and Richardson, T.S. Maximum likelihood fitting of acyclic directed mixed graphs to binary data, UAI-10, 2010.

Richardson, T.S. et al. Nested Markov properties for acyclic directed mixed graphs, arXiv:1701.06686, 2017.



rje42/ADMGs2 documentation built on Sept. 3, 2024, 7:39 p.m.