constraint-based algorithms {bnlearn} | R Documentation

## Constraint-based structure learning algorithms

### Description

Learn the equivalence class of a directed acyclic graph (DAG) from data using the PC, Grow-Shrink (GS), Incremental Association (IAMB), Fast Incremental Association (Fast-IAMB), Interleaved Incremental Association (Inter-IAMB), Incremental Association with FDR (IAMB-FDR), Max-Min Parents and Children (MMPC), Semi-Interleaved HITON-PC or Hybrid Parents and Children (HPC) constraint-based algorithms.

### Usage

    pc.stable(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = FALSE)
    gs(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = FALSE)
    iamb(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = FALSE)
    fast.iamb(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = FALSE)
    inter.iamb(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = FALSE)
    iamb.fdr(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = FALSE)
    mmpc(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = TRUE)
    si.hiton.pc(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = TRUE)
    hpc(x, cluster, whitelist = NULL, blacklist = NULL, test = NULL,
      alpha = 0.05, B = NULL, max.sx = NULL, debug = FALSE, undirected = TRUE)

### Arguments

`x` | a data frame containing the variables in the model.
`cluster` | an optional cluster object from package parallel.
`whitelist` | a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs to be included in the graph.
`blacklist` | a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs not to be included in the graph.
`test` | a character string, the label of the conditional independence test to be used in the algorithm. If none is specified, the default test statistic is the mutual information for categorical variables, the Jonckheere-Terpstra test for ordered factors and the linear correlation for continuous variables. See `independence tests` for details.
`alpha` | a numeric value, the target nominal type I error rate.
`B` | a positive integer, the number of permutations considered for each permutation test. It will be ignored with a warning if the conditional independence test specified by the `test` argument is not a permutation test.
`max.sx` | a positive integer, the maximum allowed size of the conditioning sets used in conditional independence tests. The default is that there is no limit on size.
`debug` | a boolean value. If `TRUE` a lot of debugging output is printed; otherwise the function is completely silent.
`undirected` | a boolean value. If `TRUE` no attempt will be made to determine the orientation of the arcs; the returned (undirected) graph will represent the underlying structure of the Bayesian network.

### Value

An object of class `bn`. See `bn-class` for details.

### Note

Note that even when `undirected` is set to `FALSE` there is no guarantee that all arcs in the returned network will be directed; some arc directions are impossible to learn just from data due to score equivalence. `cextend()` provides a consistent extension of partially directed networks into directed acyclic graphs, which can then be used (for instance) for parameter learning.

See `structure learning` for a complete list of structure learning algorithms with the respective references. All algorithms accept incomplete data, which they handle by computing individual conditional independence tests on locally complete observations.

### Author(s)

Marco Scutari

### See Also

`independence tests`, local discovery algorithms, score-based algorithms, hybrid algorithms, cextend.

[Package bnlearn version 4.7.1 Index]