Skip to content

04. Disease Interactions

Nao Yamamoto edited this page Oct 18, 2025 · 1 revision

MIGHTI supports structured interactions between health conditions, allowing the presence of one condition to influence the acquisition risk of another. These interactions are defined explicitly and implemented using Starsim's connector architecture.

Types of Interactions

MIGHTI currently supports susceptibility-based interactions, where the presence of one condition increases the likelihood of acquiring another. Two main types are modeled:

  1. HIV → Health Conditions (HCs)
    HIV increases susceptibility to several conditions, such as tuberculosis and cervical cancer. These interactions are defined using relative susceptibility (rel_sus) values in the parameter file.

  2. HC → HC
    Examples include:

    • Obesity increasing the risk of type 2 diabetes
    • Depression increasing the risk of alcohol use disorder

These non-HIV interactions are handled via a general-purpose interaction matrix.

Input Format

HC-HC interactions are specified using a square ($n \times n$) matrix stored in a CSV file. Both the row and column names correspond to the same set of health conditions. Each entry in the matrix represents a relative risk multiplier that modifies the acquisition probability of the column condition, given that the row condition is already present.

Example structure (partial):

has_condition Type2Diabetes Hypertension AlcoholUseDisorder
Obesity 7.37 1.87
MajorDepressiveDisorder 1.37 1.42 1.6
  • The entry 7.37 under Type2Diabetes in the Obesity row indicates that obesity increases the risk of type 2 diabetes by a factor of 7.37.
  • Blank entries imply no specified interaction.

HIV-related susceptibility is often stored separately in the main disease parameter file (e.g., eswatini_parameters.csv) as a rel_sus column. For example, if HIV increases the risk of cardiovascular disease by a factor of 2.1:

condition,rel_sus
CardiovascularDiseases,2.1

Implementation

Interactions are implemented using Starsim's connector system:

  • NCDHIVConnector handles susceptibility modifiers for people living with HIV.
  • DiseaseInteractionConnector processes all other health condition–to–health condition interactions based on the matrix.

How To Use:

HC-HC interactions are dynamically created as:

interaction_df = pd.read_csv("mighti/data/rel_sus.csv", index_col=0)
connectors = mi.create_connectors(interaction_df)

HIV-HC interactions can be passed via:

hiv_risks = df.set_index("condition")["rel_sus"].to_dict()
ncd_hiv_connector = mi.NCDHIVConnector(hiv_risks)
connectors = [ncd_hiv_connector]

Add the connectors to your simulation configuration:

sim = ss.Sim(connectors=connectors, ...)

Clone this wiki locally