fertility_distribution
FertilityDistribution
Bases: Updateable
Source code in emod_api/demographics/fertility_distribution.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
__init__(ages_years, calendar_years, pregnancy_rate_matrix)
A pregancies/births distribution in units of "annual birth rate per 1000 women". For alternative representations of fertlity/birth in EMOD, see config parameter Birth_Rate_Dependence for more details.
The FertilityDistribution is used to determine the rate of pregnancies that a "possible mother" will have based on the individual's age and the calendar year. A woman is a possible mother if her age is between (14.0, 45.0) non-inclusive and is not already pregnant. Once a woman becomes pregnant, she will be pregnant for 40 weeks and then give birth.
EMOD uses double linear interpolation (bilinear) of a 'possible mothers' age and the current calendar year to determine her probability of becoming pregnant. At every time step, 'possible mothers' are identified and are then probabilistically checked to determine if they become pregnant. - See https://www.wikihow.com/Do-a-Double-Linear-Interpolation
Fertility at any age or any year that preceeds or exceeds the supplied data will be equal to the value at the nearest age and/or timepoint of supplied data.
In order to model the transfer of immunity or infection from mother to child, one must model pregnancies.
NOTE: In the limit of low birth rate, the probability of becoming pregnant is equivalent to the birth rate. However, at higher birth rates, some fraction of possible mothers will already be pregnant. Roughly speaking, if we want women to give birth every other year, and they gestate for one year, then the expected time between pregnancy has to be one year, not two. Hence, the maximum possible birth rate is 1 child per woman per gestation period.
To determine if a woman becomes pregnant, the following logic is used:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ages_years
|
list[float]
|
A list of ages (in years) that fertility data will be provided for. Must be a list of monotonically increasing floats. Regardless of the provided ages and data, women in EMOD can only be possible mothers if their age is between (14.0, 45.0) non-inclusive. |
required |
calendar_years
|
list[float]
|
A list of times (in calendar years) that fertility data will be provided for. Must be a list of monotonically increasing floats within range 1900 <= year <= 2200 . |
required |
pregnancy_rate_matrix
|
list[list[float]]
|
A 2-d grid of fertility rates in units of "annual birth rate per 1000 women". The first data dimension (index) is by age, the second data dimension is by calendar year. For M ages (in years) and N calendars years, the dimensionality of this matrix must be MxN . |
required |
Example
ages_years: [15.0, 24.999, 25.0, 34.999, 35.0, 44.999, 45.0, 125.0] # M ages calendar_years: [2010.0, 2014.999, 2015.0, 2019.999, 2020.0, 2024.999] # N times pregnancy_rate_matrix: dimensionality MxN, units: fertility/year/1000 women [[103.3, 103.3, 77.5, 77.5, 65.5, 65.5], # fertility rates at age 15.0, the six timepoints above [103.3, 103.3, 77.5, 77.5, 65.5, 65.5], # fertility rates at age 24.999 [265.0, 265.0, 278.7, 278.7, 275.4, 275.4], # fertility rates at age 25.0 [265.0, 265.0, 278.7, 278.7, 275.4, 275.4], # fertility rates at age 34.999 [152.4, 152.4, 129.2, 129.2, 115.9, 115.9], # fertility rates at age 35.0 [152.4, 152.4, 129.2, 129.2, 115.9, 115.9], # fertility rates at age 44.999 [19.9, 19.9, 14.6, 14.6, 12.1, 12.1], # fertility rates at age 45.0 [19.9, 19.9, 14.6, 14.6, 12.1, 12.1]] # fertility rates at age 125.0
A 30 year-old woman who is not pregnant at time/year 2022.5 bilinearly interpolated (shown in steps): 275.4 + (2022.5-2020.0) * ((275.4-275.4) / (2024.999-2020.0)) = 275.4 (age 25.0 fertility at 2022.5) 275.4 + (2022.5-2020.0) * ((275.4-275.4) / (2024.999-2020.0)) = 275.4 (age 34.99 fertility at 2022.5) 275.4 + (30-25.0) * ((275.4-275.4) / (34.999-25)) = 275.4 (age 30 fertility at 2022.5) scale result to fertility/woman/day: 275.4 / (365 * 1000) = 0.0007545 (birth probability)
Source code in emod_api/demographics/fertility_distribution.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|