Skip to content

Conversation

@mmsuarezcosta
Copy link
Collaborator

@mmsuarezcosta mmsuarezcosta commented Sep 3, 2025

Parameters that remain hardcoded

  • Dateoffsets
  • consumable and dosages

Files that I changed:
- Discontinuation_ByAge
- Initiation_byage
- Pregnancy_NotUsing_HIVeffect
- Pregnancy_NotUsing_In_2010
- Simplified_labour_parameters
- ResourceFile_ContraceptionAnalysisParams.csv
- ResourceFile_ContraceptionParams.csv

Files that require refactoring in order to properly label:
- Discontinuation_ByMethod
- Failure_ByMethod
- Initiation_AfterBirth
- Initiation_ByMethod
- Interventions_Pop
- Interventions_PPFP
- Method_Use_In_2010
- Prob_Switch_From
- Prob_Switch_From_And_To

Parameters requiring revision

  • Local: Pregnancy_NotUsing_In_2010, Interventions_Pop, Interventions_PPFP
  • Universal:
    - Pregnancy_NotUsing_HIVeffect (relative rate), Failure_ByMethod, rr_fail_under25 (not sure if this one takes into account the adherence rates of individuals in specific countries or if it is purely based on the efficacy of the contracpetion)
    - min_age_contraception and max_age_contraception : These is based off of the Guttmacher paper which is 'universal', so maybe these ranges should be defined as universal?
  • Undetermined: Assume that all variables leveraged in the functions time_age_trend_in_initiation and time_age_trend_in_stopping were created for calibration purposes and thus are labeled as such

Recommendations:

  • Hard code parameters from ResourceFile_ContraceptionAnalysisParams.csv in the analysis file to minimize the number of additional resource files
  • Restructure contraception folder to same structure as other (i.e. rename 'contraception' folder to ResourceFile_Contraception and place all files here)

@mmsuarezcosta mmsuarezcosta linked an issue Sep 3, 2025 that may be closed by this pull request
@mmsuarezcosta mmsuarezcosta changed the title 1649 contraception Param Revamp - Contraceptions Sep 5, 2025
@mmsuarezcosta mmsuarezcosta changed the title Param Revamp - Contraceptions Param Revamp - Contraception Sep 5, 2025
@mmsuarezcosta
Copy link
Collaborator Author

Ready for @marghe-molaro and @mnjowe review

@mmsuarezcosta mmsuarezcosta requested review from joehcollins and removed request for joehcollins October 20, 2025 03:25
Copy link
Collaborator

@mnjowe mnjowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Mariana @mmsuarezcosta for the great work. This is looking great!

My comments are as follows:

For resource files Initiation_ByAge.csv and Discontinuation_ByAge.csv

  • Please make sure you are assigning correct prio_min for the negative values

For the resourcefile ResourceFile_ContraceptionParams.csv;

  • Are the values for age_modification_factors parameter probabilities or rates?

  • We are running the simulation from 2010 - 2099 so I don't know if the below is the correct assignment of prior min and prior max.

      parameter_name               value           prior_min   prior_max
      min_simulation_year         2010,                 2000        2020
      max_simulation_year.        2101,                 2050        2150


_years = np.arange(2010, 2101)
_ages = np.arange(15, 50)
_years = np.arange(self.parameters['min_simulation_year'], self.parameters['max_simulation_year'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason why I have left a comment on why we should reconsider the values for both prior_min and prior_max on the years

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that the vague prior is helpful in case we want to change from running it from its current values, what other ranges can we consider

@mmsuarezcosta
Copy link
Collaborator Author

2010

Thanks for your review @mnjowe !

  • age_modification_factors: I have interpreted these as rates
  • min_simulation_year, max_simulation_year: For the priors, I have left them very vague as to allow for modelers to determine if they would like to change the date ranges. Given that our simulations never start before 2010, I will change the prior_min of min_simulation_year to 2010. For the other, I have left it wide based on how far into the future developers would like to simulate. Please recommend a different range if you believe we should update. Thanks.

@marghe-molaro
Copy link
Collaborator

Hi @mmsuarezcosta and @mnjowe,

min_simulation_year and max_simulation_year are scenario parameters, not undetermined, as they just describe the set up of the runs, so by definition they don't have a prior.

Other than this, I am happy for @EvaJanouskova as module leader to review. Eva, it would be particularly helpful if you confirm what the files used for analysis are, as we would like to move these to a different location. Many thanks in advance!

@mmsuarezcosta
Copy link
Collaborator Author

Hi @mmsuarezcosta and @mnjowe,

min_simulation_year and max_simulation_year are scenario parameters, not undetermined, as they just describe the set up of the runs, so by definition they don't have a prior.

Other than this, I am happy for @EvaJanouskova as module leader to review. Eva, it would be particularly helpful if you confirm what the files used for analysis are, as we would like to move these to a different location. Many thanks in advance!

@marghe-molaro Makes sense, I have updated the parameter CSV. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contraception Module

4 participants