Skip to content

Commit

Permalink
Merge pull request #53 from EpiModel/epistat_alpha
Browse files Browse the repository at this point in the history
fix inconsistency in race order
  • Loading branch information
AdrienLeGuillou authored Apr 16, 2024
2 parents b07e445 + 5003d23 commit d334d43
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ARTnet
Version: 2.7.0
Date: 2022-11-11
Version: 2.8.0
Date: 2024-04-16
Title: Epidemic and Network Model Parameterization with the ARTnet Dataset
Description: Epidemic and Network Model Parameterization with the ARTnet Dataset.
Maintainer: Samuel Jenness <samuel.m.jenness@emory.edu>
Expand Down
10 changes: 8 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@

## ARTnet v2.8.0

* Modify the order of the `race.prop` argument to `build_netstats`. The new
order is: "Black, Hispanic, and White/Other" to be consistent with the rest of
ARTnet and EpiModelHIV. (Previously, "White/Other" was first).

## ARTnet v2.7.0

### Age Range Expansion
* ARTnet now allows for specifying an age range that spans outside the range of the age eligibility criteria of ARTnet itself. For example, it may be desired to have a population ranging from age 15 to 100 represented in the epidemic model but only to model sexual activity within 15 to 65 year olds (corresponding to ARTnet eligibility). This approach is motivated by cost-effectiveness analysis models that require tracking demographics through natural mortality rather than the age of sexual cessation. Examples are provided in the documentation of `build_epistats`, `build_netparams`, and `build_netstats`.
* There is related flexibility in passing in the age distribution structure in `build_netstats`. This allows passing in different starting age distributions necessary for the TERGM model fitting.
* ARTnet now allows for specifying an age range that spans outside the range of the age eligibility criteria of ARTnet itself. For example, it may be desired to have a population ranging from age 15 to 100 represented in the epidemic model but only to model sexual activity within 15 to 65 year olds (corresponding to ARTnet eligibility). This approach is motivated by cost-effectiveness analysis models that require tracking demographics through natural mortality rather than the age of sexual cessation. Examples are provided in the documentation of `build_epistats`, `build_netparams`, and `build_netstats`.
* There is related flexibility in passing in the age distribution structure in `build_netstats`. This allows passing in different starting age distributions necessary for the TERGM model fitting.

### Updated Mortality Rate Parameterization
* Default age-specific mortality rates from 2020 census are now included. Also provided is a general updating function, `update_asmr` to allow passing in other mortality rate data. See the help page for details and examples.
Expand Down
6 changes: 4 additions & 2 deletions R/NetStats.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#' @param edges.avg If `TRUE`, calculates the overall edges target statistics as a weighted average
#' of the statistics for edges by race/ethnicity group; if `FALSE`, takes the raw average.
#' @param race.prop A numerical vector of length 3, containing the proportion of the population with
#' each of the three values for the nodal attribute "race" in order: White/Other, Black,
#' and Hispanic).
#' each of the three values for the nodal attribute "race" in order: Black,
#' Hispanic, and White/Other).
#' @param young.prop The proportion of the population that should be below the age of sexual cessation.
#' Default is NULL (meaning no re-weighting of the `age.pyramid` parameter is performed).
#' This parameter is only used if the age of sexual cessation is less than the upper age bound.
Expand Down Expand Up @@ -117,6 +117,8 @@ build_netstats <- function(epistats, netparams,
# race.dist.3cat

if (!is.null(race.prop)) {
# reorder for consistency with the else case
race.prop <- race.prop[c(3, 1, 2)]
props <- as.data.frame(t(race.prop))
colnames(props) <- c("White.Other", "Black", "Hispanic")
} else {
Expand Down

0 comments on commit d334d43

Please sign in to comment.