hiv
Defines classes and methods for HIV natural history
Classes
| Name | Description |
|---|---|
| HIVsim | A class based around performing operations on a self.pars dict. |
HIVsim
hiv.HIVsim(sim, art_datafile, hiv_datafile, hiv_pars)A class based around performing operations on a self.pars dict.
Methods
| Name | Description |
|---|---|
| check_hiv_death | Check for new deaths from HIV |
| finalize | Compute prevalence, incidence. |
| get_hiv_data | Load HIV incidence and art coverage data, if provided |
| init_states | Add HIV-related states to the people states |
| load_data | Load any data files that are used to create additional parameters, if provided |
| new_hiv_infections | Apply HIV infection rates to population |
| set_hiv_prognoses | Set HIV outcomes |
| step | Wrapper method that checks for new HIV infections, updates prognoses, etc. |
| update_cd4 | Update CD4 counts |
| update_hiv_results | Update the HIV results |
| update_hpv_progs | Update people’s relative susceptibility, severity, and immunity |
check_hiv_death
hiv.HIVsim.check_hiv_death(people)Check for new deaths from HIV
finalize
hiv.HIVsim.finalize(sim)Compute prevalence, incidence.
get_hiv_data
hiv.HIVsim.get_hiv_data(hiv_datafile=None, art_datafile=None, add_lower=False)Load HIV incidence and art coverage data, if provided
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| location | str | must be provided if you want to run with HIV dynamics | required |
| hiv_datafile | str | must be provided if you want to run with HIV dynamics | None |
| art_datafile | str | must be provided if you want to run with HIV dynamics | None |
| verbose | bool | whether to print progress | required |
Returns
| Name | Type | Description |
|---|---|---|
| hiv_inc | dict | dictionary keyed by sex, storing arrays of HIV incidence over time by age |
| art_cov | dict | dictionary keyed by sex, storing arrays of ART coverage over time by age |
init_states
hiv.HIVsim.init_states(people)Add HIV-related states to the people states
load_data
hiv.HIVsim.load_data(hiv_datafile=None, art_datafile=None)Load any data files that are used to create additional parameters, if provided
new_hiv_infections
hiv.HIVsim.new_hiv_infections(people, year=None)Apply HIV infection rates to population
set_hiv_prognoses
hiv.HIVsim.set_hiv_prognoses(people, inds)Set HIV outcomes
step
hiv.HIVsim.step(people=None, year=None)Wrapper method that checks for new HIV infections, updates prognoses, etc.
update_cd4
hiv.HIVsim.update_cd4(people)Update CD4 counts
update_hiv_results
hiv.HIVsim.update_hiv_results(people, hiv_inds)Update the HIV results
update_hpv_progs
hiv.HIVsim.update_hpv_progs(people)Update people’s relative susceptibility, severity, and immunity