| sim.chordal | R Documentation | 
Simulates a chordal network based on number of nodes. Data will also be simulated based on the true network structure
sim.chordal(
  nodes,
  inverse = c("cases", "matrix"),
  n = NULL,
  ordinal = FALSE,
  ordLevels = NULL,
  idio = NULL,
  eps = NULL
)
| nodes | Numeric. Number of nodes in the simulated network | 
| inverse | Character. Method to produce inverse covariance matrix. 
 | 
| n | Numeric. Number of cases in the simulated dataset | 
| ordinal | Boolean.
Should simulated continuous data be converted to ordinal?
Defaults to  | 
| ordLevels | Numeric.
If  | 
| idio | Numeric.
DESCRIPTION.
Defaults to  | 
| eps | Numeric.
DESCRIPTION.
Defaults to  | 
Returns a list containing:
| cliques | The cliques in the network | 
| separators | The separators in the network | 
| inverse | Simulated inverse covariance matrix of the network | 
| data | Simulated data from sim.correlation in the  | 
Guido Previde Massara <gprevide@gmail.com>
Massara, G. P. & Aste, T. (2019). Learning clique forests. ArXiv.
#Continuous data
sim.Norm <- sim.chordal(nodes = 20, inverse = "cases", n = 1000)
#Ordinal data
sim.Likert <- sim.chordal(nodes = 20, inverse = "cases", n = 1000, ordinal = TRUE)
#Dichotomous data
sim.Binary <- sim.chordal(nodes = 20, inverse = "cases", n = 1000, ordinal = TRUE, ordLevels = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.