ContraceptiveChoice#

class ContraceptiveChoice(pars=None, **kwargs)[source]#

Bases: Connector

Attributes

auto_state_list

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

average_dur_use

dt

Get the current module timestep

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

init_results()[source]#

Initialize results for this module

init_post()[source]#

Decide who will start using contraception, when, which contraception method and the duration on that method. This method is called by the simulation to initialise the people object at the beginning of the simulation and new people born during the simulation.

init_contraception(uids)[source]#

Used for all agents at the start of a sim and for newly active agents throughout

start_contra(uids)[source]#

Wrapper method to start contraception for a set of users

get_method_by_label(method_label)[source]#

Extract method according to its label / long name

get_contra_users(uids, event=None)[source]#

Select contraception users, return boolean array

update_contra(uids)[source]#

Update contraceptive choices for a set of users.

set_method(uids)[source]#

Wrapper for choosing method and assigning duration of use

update_results()[source]#

Note that we are not including LAM users in mCPR as this model counts all women passively using LAM but DHS data records only women who self-report LAM which is much lower. Follows the DHS definition of mCPR.