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, ...)

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

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 }
#> ------------------------------------------------- #> 4ti2 version 1.6.7 #> Copyright 1998, 2002, 2006, 2015 4ti2 team. #> 4ti2 comes with ABSOLUTELY NO WARRANTY. #> This is free software, and you are welcome #> to redistribute it under certain conditions. #> For details, see the file COPYING. #> ------------------------------------------------- #> Creating file /var/folders/r3/126_d6t55f5d32tplbg5mk1d0c48s9/T//RtmpugrA1n/2020_03_17_23_45_33_ieexomb92Q/PROJECT.mat.
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 1 0 0 0 0 0 0 0 0 1 0 0 0 #> [2,] 0 1 0 0 0 0 0 0 0 0 1 0 0 #> [3,] 0 0 1 0 0 0 0 0 0 0 0 1 0 #> [4,] 0 0 0 1 0 0 0 0 0 0 0 0 1 #> [5,] 0 0 0 0 1 0 0 0 0 0 0 0 0 #> [6,] 0 0 0 0 0 1 0 0 0 0 0 0 0 #> [7,] 0 0 0 0 0 0 1 0 0 0 0 0 0 #> [8,] 0 0 0 0 0 0 0 1 0 0 0 0 0 #> [9,] 0 0 0 0 0 0 0 0 1 0 0 0 0 #> [10,] 1 1 1 0 0 0 0 0 0 0 0 0 0 #> [11,] 0 0 0 1 1 1 0 0 0 0 0 0 0 #> [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