Skip to contents

Faithful port of rcd.py's extract_vars_sharing_confounders() (original 352-366 lines). Only pairs with no parent-child relationship in either direction are considered.

Usage

extract_vars_sharing_confounders(X, P, cor_alpha)

Arguments

X

(uncentered) data matrix

P

parent list from extract_parents()

cor_alpha

correlation-test significance level

Value

list of length ncol(X); each element is a sorted integer vector of indices sharing a latent confounder with that variable (symmetric)