Skip to content

Code to analyze data on sexual networks and its impacts on mpox transmission during the 2022-2023 outbreak. Published in JID (2024).

Notifications You must be signed in to change notification settings

pop-health-mod/mpox-engage-sex-networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpox-engage-sex-networks

Code to analyze data on sexual networks and its impacts on mpox transmission during the 2022-2023 outbreak.

The results are presented in the Journal of Infectious Disease article titled Characteristics of the sexual networks of men who have sex with men in Montréal, Toronto, and Vancouver: Insights from Canada's 2022 mpox outbreak (February 2024).

code structure

Briefly, the first number in the file prefix means the following

  • 1: descriptive analyses,
  • 2: main analyses (degree distribution, mpox R0 estimation), and
  • 3: sensitivity and supplementary analyses (alternative outcome: anal partnerships, restriction, covariate standardization), mpox Re from mpox incidence data.

The second number is simply to maintain files in order.

NB: R0 is the basic reproduction number and Re is the effective or instantaneous reproduction number.

descriptive analyses

main analyses

  • Scripts 21 through 23 fit the negative binomial regression models (21_distr_fit_negbin_coef.R), perform the post-stratification (src-stan/regression_negbin_aggregate.stan), and compute the fitted population-wide distribution of the number of sexual partners based on the post-stratified samples (script 22_distr_fit_negbin_predictive.R).

    • Script 21 also produces Table S4 (regression coefficients).
    • The post-stratification procedure is explained in detail in Supplementary Materials section Distribution of sexual partner numbers (Bayesian regression and post-stratification).
    • 23_distr_fit_negbin_figs.R generates Figure 1 (CDF of the number of sexual partners in P6M in each city) and Figure S1 (model fit).
  • Scripts 24 through 27 compute the mpox R0 using the next-generation matrix (NGM).

    • 24_r0_categorize_pmf.R partitions the population into sexual activity groups with pre-specified sizes (as a % of the total population), based on the estimated distributions from 2123 (Table S7).
    • 25_r0_seir_model.R computes the mpox R0 in two steps:
      1. A SEIR-type model is calibrated to public mpox incidence data (formatted in 13) in order to estimate natural history parameters (Table S2). (See Supplementary Materials section Reproduction number using a risk-stratified deterministic SEIR model and the next-generation matrix for model equations, src/seir_fns.R for model code).
      2. The NGM method is used to compute the mpox R0 based on the fitted distribution of sexual partner numbers estimated above and the city-specific parameters estimated with the SEIR model. This script also computes the Re assuming set proportions of the population are immune (in the highest-activity groups), and projects the mpox R0 and Re based on pre-COVID-19 sexual activity levels.
    • From the results produced by 25, 26_r0_seir_outputs.R generates Figure 2 (SEIR model fit) and Figure 3 (R0 and Re based on the NGM method).
    • As a comaprison to the main results based on the NGM, 27_r0_growth_rate.R computes the mpox R0 based on the growth-rate in reported mpox cases over time, presented in Table S5.
      • This script also produces Figure S2 (cumulative mpox incidence in each province).

sensitivity and supplementary analyses

  • 31_supp_restriction.R performs the restriction sensitivity analysis, which fits the regression models restricting the analytical sample to participants who had visits at all three timepoints. Results are in Figure S3.
  • 32_supp_standardization.R performs the regression-based standardization. Results are in Figure S4.
  • Scripts 21 through 23 described in the previous section can be modified to use the alternative anal partners in P6M outcome variable, or to use a zero-inflated negative binomial model for the main outcome variable. Results are shown in Figure S5 and Figure S6, respectively.
  • 33_supp_sensitivity_figs.R generates Figures S3–S6 from the analyses described above.
  • 34_supp_rt_case.R estimates the Re using the EpiEstim package, and results of which are shown in Figure S8.

About

Code to analyze data on sexual networks and its impacts on mpox transmission during the 2022-2023 outbreak. Published in JID (2024).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published