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:
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 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
has_product
Check if the intervention has a product
now
Shortcut to self.t.now()
states
Return a flat list of all states
statesdict
Return a flat dictionary (objdict) of all states
ti
Get the current module timestep
timevec
Shortcut to self.t.timevec
Methods