diff --git a/tests/test_ordinallogit.py b/tests/test_ordinallogit.py
index 5b4fb83..51c8727 100644
--- a/tests/test_ordinallogit.py
+++ b/tests/test_ordinallogit.py
@@ -1,5 +1,5 @@
# scipy-yli: Helpful SciPy utilities and recipes
-# Copyright © 2022 Lee Yingtong Li (RunasSudo)
+# Copyright © 2022–2023 Lee Yingtong Li (RunasSudo)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -44,7 +44,7 @@ def test_ordinallogit_ucla():
expected_summary = ''' Ordinal Logistic Regression Results
==========================================================
Dep. Variable: apply | No. Observations: 400
- Model: Ordinal Logit | Df. Model: 5
+ Model: Ordinal Logit | Df. Model: 3
Date: {0:%Y-%m-%d} | Df. Residuals: 395
Time: {0:%H:%M:%S} | Pseudo R²: 0.03
Std. Errors: Non-Robust | LL-Model: -358.51
@@ -62,7 +62,7 @@ somewhat likely/very likely 4.30 (2.72 - 5.88) <0.001*
------------------------------------------------------------'''.format(result.fitted_dt)
assert result.summary() == expected_summary
- assert result._repr_html_() == '
Ordinal Logistic Regression ResultsDep. Variable: | apply | No. Observations: | 400 |
---|
Model: | Ordinal Logit | Df. Model: | 5 |
---|
Date: | {0:%Y-%m-%d} | Df. Residuals: | 395 |
---|
Time: | {0:%H:%M:%S} | Pseudo R2: | 0.03 |
---|
Std. Errors: | Non-Robust | LL-Model: | -358.51 |
---|
| | LL-Null: | -370.60 |
---|
| | p (LR): | <0.001* |
---|
| β | (95% CI) | p |
---|
pared | 1.05 | (0.53 | – | 1.57) | <0.001* |
---|
public | -0.06 | (-0.64 | – | 0.53) | =0.84 |
---|
gpa | 0.62 | (0.10 | – | 1.13) | =0.02* |
---|
(Cutoffs) | | | | | |
---|
unlikely/somewhat likely | 2.20 | (0.68 | – | 3.73) | =0.005* |
somewhat likely/very likely | 4.30 | (2.72 | – | 5.88) | <0.001* |
'.format(result.fitted_dt)
+ assert result._repr_html_() == 'Ordinal Logistic Regression ResultsDep. Variable: | apply | No. Observations: | 400 |
---|
Model: | Ordinal Logit | Df. Model: | 3 |
---|
Date: | {0:%Y-%m-%d} | Df. Residuals: | 395 |
---|
Time: | {0:%H:%M:%S} | Pseudo R2: | 0.03 |
---|
Std. Errors: | Non-Robust | LL-Model: | -358.51 |
---|
| | LL-Null: | -370.60 |
---|
| | p (LR): | <0.001* |
---|
| β | (95% CI) | p |
---|
pared | 1.05 | (0.53 | – | 1.57) | <0.001* |
---|
public | -0.06 | (-0.64 | – | 0.53) | =0.84 |
---|
gpa | 0.62 | (0.10 | – | 1.13) | =0.02* |
---|
(Cutoffs) | | | | | |
---|
unlikely/somewhat likely | 2.20 | (0.68 | – | 3.73) | =0.005* |
somewhat likely/very likely | 4.30 | (2.72 | – | 5.88) | <0.001* |
'.format(result.fitted_dt)
def test_brant_ucla():
"""Compare RegressionModel.brant with R brant library for UCLA example at https://stats.oarc.ucla.edu/r/dae/ordinal-logistic-regression/"""
diff --git a/yli/regress.py b/yli/regress.py
index 2e008a4..8f8f352 100644
--- a/yli/regress.py
+++ b/yli/regress.py
@@ -1063,7 +1063,7 @@ class OrdinalLogit(RegressionModel):
Ordinal Logistic Regression Results
==========================================================
Dep. Variable: apply | No. Observations: 400
- Model: Ordinal Logit | Df. Model: 5
+ Model: Ordinal Logit | Df. Model: 3
Date: 2022-12-02 | Df. Residuals: 395
Time: 21:30:38 | Pseudo R²: 0.03
Std. Errors: Non-Robust | LL-Model: -358.51