update_methods#

class update_methods(year, eff=None, probs=None, matrix=None, verbose=False)[source]#

Bases: Intervention

Intervention to modify method efficacy and/or switching matrix.

Parameters:
  • year (float) – The year we want to change the method.

  • eff (dict) –

    An optional key for changing efficacy; its value is a dictionary with the following schema:

    {method: efficacy}

    Where method is the method to be changed, and efficacy is the new efficacy (can include multiple keys).

  • probs (list) –

    A list of dictionaries where each dictionary has the following keys:

    source (str): the source method to be changed. dest (str): the destination method to be changed. factor (float): the factor by which to multiply existing probability; OR value (float): the value to replace the switching probability value. keys (list): a list of strings representing age groups to affect. matrix (str): one of [‘probs’, ‘probs1’, ‘probs1to6’] where:

    probs: Changes the specified uptake at the corresponding year regardless of state. probs1: Changes the specified uptake for all individuals in their first month postpartum. probs1to6: Changes the specified uptake for all individuals that are in the first 6 months postpartum.

Methods

apply(sim)[source]#

Applies the efficacy or contraceptive uptake changes if it is the specified year based on scenario specifications.