knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(ADMGs2)
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()
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)
We can use the twins
data set as a toy example.
data(twins) gr4 <- makeGraphCycle(4, type="bidirected") summary(fitADMG(twins, graph=gr4))
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.