change_initiation#

class change_initiation(years=None, eligibility=None, perc=0.0, annual=True, force_theoretical=False, age_range=None, perc_of_eligible=False, target_method=None, final_perc=None, verbose=False, **kwargs)[source]#

Bases: Intervention

Intervention that modifies the outcomes of whether women are on contraception or not Select a proportion of women and sets them on a contraception method.

Parameters:
  • years (list, float) – The year we want to start the intervention. if years is None, uses start and end years of sim as defaults if years is a number or a list with a single element, eg, 2000.5, or [2000.5], this is interpreted as the start year of the intervention, and the end year of intervention will be the end of the simulation

  • eligibility (callable) – callable that returns a filtered version of people eligible to receive the intervention

  • perc (float) –

    a value between 0 and 1 indicating the x% extra of women who will be made to select a contraception method. The proportion or % is with respect to the number of women who were on contraception:

    • the previous year (12 months earlier)?

    • at the beginning of the intervention.

  • annual (bool) – whether the increase, perc, represents a “per year” increase.

  • age_range (tuple, optional) – (min_age, max_age) to restrict eligibility. If provided, only women in this age range are eligible. Use with perc_of_eligible=True.

  • perc_of_eligible (bool) – If True, perc is percentage of eligible women (not of current users). Use this with age_range for age-targeted scale-up scenarios.

  • target_method (str/int, optional) – Method name or index for new users. If None, uses natural method distribution.

  • final_perc (float, optional) – If provided, perc will scale linearly from initial perc to final_perc over the intervention period. Enables scale-up scenarios.

Attributes

auto_state_list

List of "automatic" states with boolean type (ss.BoolState) that were added via define_states()

dt

Get the current module timestep

has_product

Check if the intervention has a product

now

Shortcut to self.t.now()

state_dict

Return a flat dictionary (objdict) of all states

state_list

Return a flat list of all states (ss.Arr objects)

ti

Get the current module timestep

timevec

Shortcut to self.t.timevec

Methods

check_eligibility()[source]#

Select eligible who is eligible