update_methods#
- class update_methods(year, eff=None, dur_use=None, p_use=None, method_mix=None, method_choice_pars=None, verbose=False, **kwargs)[source]#
Bases:
InterventionIntervention 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 name of the contraceptive method to be changed, and efficacy is a number with the efficacy
dur_use (dict) –
- Optional key for changing the duration of use; its value is a dictionary with the following schema:
- {method: dur_use}
Where method is the method to be changed, and dur_use is a dict representing a distribution, e.g. dur_use = {‘Injectables: dict(dist=’lognormal’, par1=a, par2=b)}
p_use (float) – probability of using any form of contraception
method_mix (list/arr) – probabilities of selecting each form of contraception
Attributes
auto_state_listList of "automatic" states with boolean type (ss.BoolState) that were added via define_states()
dtGet the current module timestep
has_productCheck if the intervention has a product
nowShortcut to self.t.now()
state_dictReturn a flat dictionary (objdict) of all states
state_listReturn a flat list of all states (ss.Arr objects)
tiGet the current module timestep
timevecShortcut to self.t.timevec
Methods