Package edu.cmu.tetrad.search
Class SingletonAttacher
java.lang.Object
edu.cmu.tetrad.search.SingletonAttacher
Utility to attach singleton (measured) variables as children of latent blocks using a Wilks rank-drop criterion,
analogous to the latent->latent hierarchy test.
For each singleton s and each latent L with indicator set C_L, we form D = V \ (C_L ⪠{s}) and compute:
drop_L(s) = rank({s}, D) - rank({s}, D | C_L)
If max_L drop_L(s) >= minDrop, we add the edge L* -> s, where L* maximizes the drop. Ties are broken by latent name for determinism.
-
Method Summary
-
Method Details
-
attachSingletonChildren
public static List<Edge> attachSingletonChildren(org.ejml.simple.SimpleMatrix S, int sampleSize, double alpha, int minDrop, int p, List<List<Integer>> latentBlocks, List<Node> latentNodes, List<Integer> singletonCols, List<Node> singletonNodes) Returns latent->singleton edges to add.- Parameters:
S- correlation/covariance matrix (SimpleMatrix)sampleSize- number of rowsalpha- alpha for Wilks rank testsminDrop- minimum required drop (e.g., 1)p- number of observed variables (columns)latentBlocks- list of indicator column indices for each latent (size>1)latentNodes- parallel list of latent meta-nodes (same order as latentBlocks)singletonCols- list of singleton column indicessingletonNodes- parallel list of singleton meta-nodes (same order as singletonCols)- Returns:
- list of directed edges (latent -> singleton); does not modify any graph.
-