causaldag.utils.ci_tests.partial_correlation_test.partial_correlation_test

causaldag.utils.ci_tests.partial_correlation_test.partial_correlation_test(suffstat: Dict[KT, VT], i, j, cond_set=None, alpha=None)[source]

Test the null hypothesis that i and j are conditionally independent given cond_set.

Uses Fisher’s z-transform.

Parameters:
  • suffstat

    dictionary containing:

    • n – number of samples
    • C – correlation matrix
    • K (optional) – inverse correlation matrix
    • rho (optional) – partial correlation matrix (K, normalized so diagonals are 1).
  • i – position of first variable in correlation matrix.
  • j – position of second variable in correlation matrix.
  • cond_set – positions of conditioning set in correlation matrix.
  • alpha – Significance level.
Returns:

dictionary containing:

  • statistic
  • p_value
  • reject

Return type:

dict