sid.pathogenesis

Draw whether people get symptoms, need icu etc. and if so after what time.

This will have to be changed completely, once we allow for randomness in the countdown lengths. Currently, most of it is deterministic.

Module Contents

Functions

draw_course_of_disease(states, params, seed)

Draw course of the disease.

_draw_countdowns(states, params_slice)

Draw the countdowns.

draw_course_of_disease(states, params, seed)[source]

Draw course of the disease.

The course of disease is drawn before the actual simulation and samples for each individual the length of the countdown.

Countdowns govern the transition from becoming infectious, to potentially having symptoms, needing icu and maybe even dying.

Parameters
  • states (pandas.DataFrame) – The initial states.

  • params (pandas.DataFrame) – DataFrame with parameters that influence the number of contacts, contagiousness and dangerousness of the disease, … .

  • seed (int) – Seed counter to control randomness.

Returns

The initial states extended with countdown lengths.

Return type

states (pandas.DataFrame)

_draw_countdowns(states, params_slice)[source]

Draw the countdowns.

Parameters
  • states (pandas.DataFrame) – The initial states, includes the age_group by which probabilities may differ between individuals.

  • params_slice (pandas.DataFrame) – DataFrame slice with the parameters of the current countdown to be drawn. the “name” index level contains the possible realizations, the “value” column contains the probabilities. If either differ between age groups the “subcategory” index level contains the group values. If they do not differ the “subcategory” is “all”.

Returns

Series with the countdowns. Has the same index as states.

Return type

draws (pandas.Series)