stepsel.stattests
The stepsel.statistical_tests module includes functions for performing statistical tests.
Submodules
Functions
|
Calculate likelihood ratio test for nested models. |
|
Calculate likelihood ratio test for nested models. |
Package Contents
- stepsel.stattests.likelihood_ratio_test(llf_complex, llf_nested, df_complex, df_nested)[source]
Calculate likelihood ratio test for nested models.
- Parameters:
llf_complex (float) – Log-likelihood of complex model.
llf_nested (float) – Log-likelihood of nested model.
df_complex (int) – Degrees of freedom of complex model.
df_nested (int) – Degrees of freedom of nested model.
- Returns:
- lrfloat
Likelihood ratio test statistic.
- pfloat
p-value of likelihood ratio test.
- Return type:
tuple
- stepsel.stattests.likelihood_ratio_test_models(complex: statsmodels.api.GLM, nested: statsmodels.api.GLM)[source]
Calculate likelihood ratio test for nested models.
- Parameters:
complex (sm.GLM) – Complex model.
nested (sm.GLM) – Nested model.
- Returns:
- lrfloat
Likelihood ratio test statistic.
- pfloat
p-value of likelihood ratio test.
- Return type:
tuple