P1 Survival
Planned plugin: deaths by age and sex, with under-five mortality and maternal mortality as separate targets for policies. Planned for 1.0.
In development
This plugin is planned for 1.0. This page describes its design; names and details may still change until it ships, when its generated model description replaces this page.
Status: Planned for 1.0. Version 0.1 ships no official plugin.
Purpose
Survival decides who dies at each step, by age, sex and territory. It keeps deaths under five apart from deaths at five and over, and splits the risk from five on into background mortality and maternal mortality, so that a policy can act on under-five mortality, on maternal mortality alone, or on the whole risk.
State and owned attributes
Survival owns no column of its own. A person's state is the kernel's: alive or dead, and the date of death. A newborn is exposed to death from the step after its birth.
Processes and their order within the step
Survival runs in the death phase, which by default comes second in phases.order, after ageing and before migration, union, contraception and conception and birth.
- It takes the people who are alive, in the simulated domain and not created during the current step.
- For each person it chooses the point:
under5below age five,deathfrom age five. - It reads the base hazard from its tables, by age, sex and territory, and lets the kernel apply the policies acting on the point.
- It turns the hazard into a probability over the length of the step, counted in real days, and draws once for the person.
- On a death, it emits
Mortality.Death. The kernel marks the person as dead, stores the date of death, ends the links that end on death, and passes the event to the plugins that listen to it.
Events emitted
Mortality.Death, with the class of cause,backgroundormaternal. Survival writesbackgrounduntil it reads Reproduction's maternal status.
Contract
Survival provides official/Mortality, version 1. The contract is coupled to the kernel: a major change of it is a major change of the kernel.
| Item | Kind | What it is |
|---|---|---|
Death | event | a death, with cause_class (background, maternal) |
under5 | modulation point, hazard per year | death under age five, all causes, with no parts |
death | modulation point, hazard per year | death from age five, with two parts: background and maternal |
Its decision type, the name under which the kernel gives Survival its random draws, is not named yet.
Parameters
Survival's parameters are tables, not code. Each is a hazard per year; the step's probability is one minus the exponential of minus the hazard times the step length.
- Under-five hazard, by age (in days and months), sex and year.
- Background hazard from age five, by single year of age, sex and year.
- Maternal hazard, by age, for women whose maternal status is pregnant or postpartum.
Under a monthly or yearly step, the probability of the part of the birth step in which a newborn is not exposed is carried onto its first exposed step.
Data needed from the pipeline
Tables of death hazards by age, sex and territory, registered through the data pipeline: a user's own tables for a real country. Which published tables serve as the default for real countries is not decided yet. The life-table variant ships a synthetic schedule for tests and examples only; a scenario that binds real data with it stops at start-up.
Data format
In 1.0 the official variant keeps its rates in its rules file and binds no table. A variant with a country's own rates binds rate.hazard 2.0 tables, as below (provisional):
- Background hazard from age five:
rate.hazard2.0; keyquantity,territory_unit,sex,age_lo,period_start_date.valueis a rate, in the unit named byunit. - Maternal hazard:
rate.hazard2.0; key the same, withsexfemale. - Under-five hazard: schema not fixed yet. Its ages are in days and months, and
age_locounts completed years only.
Columns of every rate table, in order: quantity, territory_unit, sex, age_lo, period_start_date, period_start_date_precision, age_hi, period_end_date, period_end_date_precision, value, unit, native_step. The first five are the key.
sex is female, male or all; age_lo and age_hi are ages in completed years, age_hi empty for an open last band; dates are full ISO dates, each with its precision (day, month or year). unit is a unit of the engine's unit list, and native_step (day, week, month or year) the duration the value was computed on; the kernel converts a hazard over the actual length of each step.
The role names are provisional.
Each table is registered with cohortix-data register and bound to a table role in the scenario's [data.bindings]; see Bring your own data.
Reads
- From the kernel: age, sex, territorial unit, and whether the person is alive and in the domain.
- Optionally, from Reproduction, the view
Reproduction.maternal_status(none,pregnantorpostpartum). Without Reproduction the view readsnone, and the maternal part stays empty.
Variants
life-table: declarative, rules over hazard tables rather than code.- A user can register their own death tables as a variant through the data pipeline, without writing code.
- Variants in which the risk of death depends on other plugins come later; they are not part of 1.0.
Policies that can modulate it
A policy acts on under5, or on death as a whole, or on one part of death only: a factor on the maternal part multiplies maternal mortality alone. A policy that replaces a value outright is refused on death, because the point has two parts.
What is a plugin?
What a plugin is in cohortix, how it attaches to the kernel through a contract, what it needs and gives, and the release each planned plugin is planned for. None is available in version 0.1.
P2 Reproduction
Planned plugin: conception, pregnancy, its outcome and birth; each newborn becomes a new person linked to the mother. Planned for 1.0.