causaldag.utils.ci_tests.partial_correlation_test.partial_correlation_suffstat

causaldag.utils.ci_tests.partial_correlation_test.partial_correlation_suffstat(samples, invert=True) → Dict[KT, VT][source]

Return the sufficient statistics for partial correlation testing.

Parameters:
  • samples – (n x p) matrix, where n is the number of samples and p is the number of variables.
  • invert – if True, compute the inverse correlation matrix, and normalize it into the partial correlation matrix. This will generally speed up the gauss_ci_test if large conditioning sets are used.
Returns:

dictionary of sufficient statistics

Return type:

dict