ehrapy.tools.test_nested_f_statistic#
- ehrapy.tools.test_nested_f_statistic(small_model, big_model)[source]#
Given two fitted GLMs, the larger of which contains the parameter space of the smaller, return the P value corresponding to the larger model adding explanatory power.
See https://stackoverflow.com/questions/27328623/anova-test-for-glm-in-python/60769343#60769343
- Parameters:
small_model (GLMResultsWrapper) – fitted generalized linear models.
big_model (GLMResultsWrapper) – fitted generalized linear models.
- Returns:
p_value
- Return type: