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:
@@ -14,6 +14,17 @@ recientes hasta él. Supervivencia por intervalos del pipeline SEER (regresión
|
||||
como la de CaMa. Sin estadio, tratamiento ni validación clínica; la defunción se conoce solo si el hospital la \
|
||||
registra."""
|
||||
|
||||
# What the model's number is, as the patient's screen shows it. The model gives the probability of dying; the screen
|
||||
# shows its complement, the probability of surviving, with the interval's ends swapped.
|
||||
[estimand]
|
||||
quantity = "Probabilidad de supervivencia"
|
||||
description = "Probabilidad de que la paciente siga viva a cada horizonte desde el diagnóstico de cáncer."
|
||||
outcome = "Muerte por cualquier causa"
|
||||
index_date = "la primera biopsia con carcinoma invasor"
|
||||
horizons_unit = "años"
|
||||
covariates = "grupo de edad al diagnóstico, citología (categorías de KPNC) y VPH más recientes hasta él"
|
||||
complement = "supervivencia"
|
||||
|
||||
[config]
|
||||
train_fraction = 0.7
|
||||
# The model's horizons, in years; `survival.horizons` are the same in months.
|
||||
|
||||
@@ -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