MergeSelect: Selection of nodes to merged at a level

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/APFAfunctions.R

Description

At a given level of an APFA object, the function performs a greedy search of node pairs to be merged.

Usage

1
MergeSelect(G, NS = NULL, this.level, crit = "BIC", verbose = FALSE)

Arguments

G

an APFA igraph object

NS

a node by symbol array. Supplying this instead of G will speed computations.

this.level

The level in which nodes are searched to be merged.

crit

The criterion for the model selection, either AIC or BIC.

verbose

If verbose is TRUE, then the all the information on the merge selection of nodes at each level are printed in the output.

Details

The function performs greedy selection at the given level. That is to say, the delta ICs for all nodes pairs at the given level are computed, the pair leading to the greatest reduction are merged, the delta ICs are recomputed as necessary, and the process continues until no further reduction in IC can be made.

Value

Returns the list of G: resulting APFA and ns: node-symbol array.

Author(s)

Smitha Ankinakatte and David Edwards

See Also

dIC, MergeNodes

Examples

1
2
3
4
5
6
7
data(Wheeze)
G <- st(Wheeze)
G <- contract.last.level(G)
G1 <- MergeSelect(G, this.level=3)
G <- G1$G
G$layout <- getXY(G)
plot(G)

gRapfa documentation built on May 2, 2019, 6:54 a.m.