8000 Additional race stratification by clchand23 · Pull Request #57 · EpiModel/ARTnet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Additional race stratification #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jan 7, 2025
Merged

Additional race stratification #57

merged 23 commits into from
Jan 7, 2025

Conversation

clchand23
Copy link
Collaborator
@clchand23 clchand23 commented Dec 20, 2024

New code allows us to specify the race categories for our analysis using race.level in build_epistats() function.

race.level is a list of race and ethnicity categories that need to match case-sensitive race and ethnicity values in ARTnet. These include "black", "hispanic", "white", "other", "asian", "ai/an", "mult", "nh/pi". Categories can be combined within the list.

Examples:

Default (3 categories)
race.level = list("black", "hispanic", c("white", "other")

Expand to 4 categories
race.level = list("black", "hispanic", "white", "other")

Specify other race groups (Note: when specifying race groups of "asian", "ai/an", "mult", "nh/pi", the "other" race group will be any other group apart from these. When specifying "other" along with "black", "hispanic", and "white", then "other" would include the race groups of "asian", "ai/an", etc.)
race.level = list("hispanic", "asian")

Outstanding items:

  • Build documentation (getting roxygen error)

Add section that stratifies race into 4 categories
Add new race stratification code
Change from race.cat3 to race.cat throughout
Update EpiStats to generalize race categorization for ARTnet network estimation by allowing user to set `race.level` to a list or vector of race and ethnicity categories as described in ARTnet data (i.e., black, hispanic, white, other, ai/an, asian, mult, nh/pi)
Update NetParams to generalize race categorization for ARTnet network estimation by allowing user to set `race.level` to a list or vector of race and ethnicity categories as described in ARTnet data (i.e., black, hispanic, white, other, ai/an, asian, mult, nh/pi)
Generalize code that assigns numbered race levels

Generalize code that assigns initial HIV status
Update capitalization of race labels to work with current code
Correct code so that age is not also updated to be 1 when setting max age for asmr
Comment out language that stops function when we input multiple init.hiv.prev values
Generalize update_asmr() function
Data manipulation that adds new variables to allow for selecting "hispanic" and "other" sub-categories from ARTnet
@clchand23 clchand23 self-assigned this Dec 20, 2024
@clchand23 clchand23 requested a review from smjenness December 20, 2024 15:30
Update documentation
@clchand23 clchand23 marked this pull request as draft December 20, 2024 15:42
@clchand23
Copy link
Collaborator Author

Hi @AdrienLeGuillou, for the downstream EpiModel updates, please see this update to mod.acts.R. This was the only changed needed.

@AdrienLeGuillou
Copy link
Member

For the mod.acts changes, if they are only on this function it should not cause any problem

To match DESCRIPTION on main branch
Build documentation
@clchand23 clchand23 marked this pull request as ready for review December 20, 2024 17:31
@clchand23
Copy link
Collaborator Author

Hi @AdrienLeGuillou - I was able to build the documentation. I think everything is ready for review now. Thanks!

Copy link
Member
@AdrienLeGuillou AdrienLeGuillou left a comment

Choose a reason for hiding this comment

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

Awesome work overall thanks!
A few minor elements to modify but nothing much.

Create exported make_race_combo() function that can also be used in EpiModel
Use new make_race_combo() function in NetParams
replace ifelse() with as.integer() for cleaner statement
Replace ifelse() with as.integer() where appropriate for cleaner code
Replace sapply() with vapply() in section renaming race levels
Rename output due to same first letter in some race groups
Replace sapply with vapply and update based on new names for numbers of agents per race group
Add comment for what for loop does in assigning HIV status

Update asmr function to ensure column names include asmr
@clchand23
Copy link
Collaborator Author

Hi @AdrienLeGuillou - I addressed the changes you requested. Please let me know if there's anything else that could use updating. Thanks!

Copy link
Member
@AdrienLeGuillou AdrienLeGuillou left a comment

Choose a reason for hiding this comment

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

Apart from the one comment, all is good

Add export flag and build documentation
Copy link
Contributor
@smjenness smjenness left a comment

Choose a reason for hiding this comment

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

Everything looks in order. Thanks for this great update!

@smjenness
Copy link
Contributor

@AdrienLeGuillou : if all these most recent updates look good, please feel free to merge. Thanks!

@AdrienLeGuillou
Copy link
Member

Awesome work @clchand23, 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.

3 participants
0