diff --git a/DESCRIPTION b/DESCRIPTION index e25bb1c..7871f6f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 diff --git a/NEWS.md b/NEWS.md index 4bd7c17..4cc6424 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/R/NetStats.R b/R/NetStats.R index 8057e48..fe8712f 100644 --- a/R/NetStats.R +++ b/R/NetStats.R @@ -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. @@ -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 {