EpiModel / ARTnet

Network and Epidemic Parameterization with the ARTnet Study Data
10 stars 5 forks source link

age.grps variable #27

Closed martinamorris closed 4 years ago

martinamorris commented 4 years ago

You construct this here: https://github.com/EpiModel/ARTnet/blob/95f6d1231f1e8e7654a74d4caa488d741117454a/R/EpiStats.R#L483

Default age.breaks are c(25, 35, 45, 55) which corresponds to (0, 25], (25, 35], (35, 45], (45, 55], (55+]

The number of age groups is 5, but your calculation above would give 3. What am I missing?

andsv2 commented 4 years ago

Good morning @martinamorris; so this is my fault and no you're not missing anything. age.breaks is passed into build_epistats() and then repurposed into the "actual" age breaks that are consistent with ARTnet data. So c(25, 35, 45, 55) becomes c(15, 25, 35, 45, 55, 100 which in turn gives an age.grps of 5. All of this occurs on line 191: https://github.com/EpiModel/ARTnet/blob/95f6d1231f1e8e7654a74d4caa488d741117454a/R/EpiStats.R#L191

martinamorris commented 4 years ago

Aha -- I did miss that. Thanks!