Ordinal association: an unbounded profile interval counts as separation
This commit is contained in:
@@ -26,6 +26,12 @@ def test_ordinal_on_monotone_trend():
|
||||
assert a.ordinal(frame, "level", "z", (), high=2)["odds_ratio"] > 1
|
||||
|
||||
|
||||
def test_ordinal_separated_binary_predictor():
|
||||
frame = pd.DataFrame({"z": [0] * 8 + [1] * 8, "level": [0, 1] * 4 + [3, 4] * 4})
|
||||
fit = a.ordinal(frame, "level", "z", (), high=3)
|
||||
assert fit["reason"] == "does not converge (separation)"
|
||||
|
||||
|
||||
def test_pairs_by_level():
|
||||
item = a.pairs("item")
|
||||
spikes = [p for p in item if p["biomarker"] == "spikes"]
|
||||
|
||||
Reference in New Issue
Block a user