genmodel | R Documentation |
genmodel runs 4ti2's genmodel program to compute the configuration matrix A corresponding to graphical statistical models given by a simplicial complex and levels on the nodes.
genmodel(varlvls, facets, dir = tempdir(), quiet = TRUE, shell = FALSE, ...)
varlvls |
a vector containing the number of levels of each variable |
facets |
the facets generating the hierarchical model, a list of vectors of variable indices |
dir |
Directory to place the files in, without an ending / |
quiet |
If FALSE, messages the 4ti2 output |
shell |
Messages the shell code used to do the computation |
... |
Additional arguments to pass to the function |
The configuration matrix of the model provided
if (has_4ti2()) {
varlvls <- rep(2, 2)
facets <- list(1, 2)
genmodel(varlvls, facets)
genmodel(varlvls, facets, quiet = FALSE)
varlvls <- rep(3, 3)
facets <- list(1:2, 2:3, c(3,1))
genmodel(varlvls, facets)
# compare this to algstat's hmat function
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.