SimpleChoice#

class SimpleChoice(pars=None, location=None, data=None, contra_mod='simple', **kwargs)[source]#

Bases: RandomChoice

Simple choice model where method choice depends on age and previous method. Uses location-specific data to set parameters, and needs to be initialized with either a location string or a data dictionary.

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

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

Return an array of probabilities that each woman will use contraception.

set_dur_method(uids, method_used=None)[source]#

Time on method depends on age and method