CaCu survival: an estimand that shows the probability of surviving
The model gives the probability of dying (`muerte`, like every batch the probability of its outcome); `complement = "supervivencia"` tells the screens to show its complement as the probability of surviving, from the first invasive biopsy, with its covariates.
This commit is contained in:
@@ -281,3 +281,12 @@ def test_the_subgroup_notebook_runs_on_a_builds_file(cohort_file, monkeypatch):
|
||||
found = _run_notebook(path, cohort_file, "cacu", "survival", monkeypatch)
|
||||
|
||||
assert sum(r["n"] for r in found["survival"]) == N
|
||||
|
||||
|
||||
def test_the_survival_scenario_shows_the_probability_of_surviving():
|
||||
"""Pins down: the scenario's estimand names the probability of surviving and marks it as the complement of the
|
||||
model's number (the probability of dying), so the patient's record shows survival, with its covariates. Fails if
|
||||
`complement` is dropped: the record would show a death probability labelled as survival."""
|
||||
estimand = Scenario.load("cacu", "survival").estimand
|
||||
assert estimand["quantity"] == "Probabilidad de supervivencia" and estimand["complement"] == "supervivencia"
|
||||
assert estimand["index_date"] == "la primera biopsia con carcinoma invasor" and "VPH" in estimand["covariates"]
|
||||
|
||||
Reference in New Issue
Block a user