causaldag.utils.invariance_tests.gauss_invariance.gauss_invariance_test

causaldag.utils.invariance_tests.gauss_invariance.gauss_invariance_test(suffstat, context, i: int, cond_set: Union[List[int], int, None] = None, alpha: float = 0.05, zero_mean=False, same_coeffs=False)[source]

Test the null hypothesis that two Gaussian distributions are equal.

Parameters:
  • suffstat

    dictionary containing:

    • obs – number of samples
    • G – Gram matrix
    • contexts
  • context – which context to test.
  • i – position of marginal distribution.
  • cond_set – positions of conditioning set in correlation matrix.
  • alpha – Significance level.
  • zero_mean – If True, assume that the regression residual has zero mean.
  • same_coeffs – If True, assume that the regression coefficients have not changed.
Returns:

dictionary containing ttest_stat, ftest_stat, f_pvalue, t_pvalue, and reject.

Return type:

dict