immunity

immunity

Immunity waning functions So far, all functions are related to parameterisation of gamma model for (vaccine acquired) immunity waning. These functions facilitate stratifying parameters by age or by other criteria.

Functions

Name Description
imm_constant_dur_by_age
imm_decay_rate_by_age
imm_draw_fn_constant This function assumes that each parameter, imm_*, follows the same
imm_ve0_by_age

imm_constant_dur_by_age

immunity.imm_constant_dur_by_age(age_bins=None, vals=None)

Parameters

Name Type Description Default
age_bins list | np.array List of age values defining bins. Length n. None
vals list | np.array List of values of constant immunity duration, expressed in years, for each age bin. Length n-1 None

Returns

Name Type Description
callable a function that takes as input the age of the agent (single float or array) and returns the appropriate value.

imm_decay_rate_by_age

immunity.imm_decay_rate_by_age(age_bins=None, vals=None)

Parameters

Name Type Description Default
age_bins list | np.array List of age values defining bins. Length n. None
vals list | np.array List of immunity decay values, expressed in 1/years, for each age bin. Length n-1 None

Returns

Name Type Description
callable a function that takes as input the age of the agent (single float or array) and returns the appropriate value.

imm_draw_fn_constant

immunity.imm_draw_fn_constant(module, uids, **kwargs)

This function assumes that each parameter, imm_*, follows the same distribution (family) across all age groups, though the distribution’s parameters can be different across ages.

Specifically in this case:

  • imm_constant_dur is a constant distribtion, depending on age
  • imm_ve0 is a constant distribution, depending on age
  • imm_decay_shape is an constant distribution, independent of age
  • imm_decay_rate is an constant distribution, depending on age

This means all agents aged x will have identical values of the corresponding immunity parameter (ie, ss.constant())

imm_ve0_by_age

immunity.imm_ve0_by_age(age_bins=None, vals=None)

Parameters

Name Type Description Default
age_bins list | np.array List of age values defining bins. Length n. None
vals list | np.array List of values of VE0, values between 0 and 1, for each age bin. Length n-1 None

Returns

Name Type Description
callable a function that takes as input the age of the agent (single float or array) and returns the appropriate value.