latte (version 0.2.1)

genmodel: Generate a configuration matrix

Description

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.

Usage

genmodel(varlvls, facets, dir = tempdir(), quiet = TRUE,
  shell = FALSE, ...)

Arguments

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

Value

The configuration matrix of the model provided

Examples

Run this code
# NOT RUN {
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

}

# }

Run the code above in your browser using DataCamp Workspace