-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
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
Update documentation
Hi @AdrienLeGuillou, for the downstream EpiModel updates, please see this update to mod.acts.R. This was the only changed needed. |
For the |
To match DESCRIPTION on main branch
Build documentation
Hi @AdrienLeGuillou - I was able to build the documentation. I think everything is ready for review now. Thanks! |
There was a problem hiding this 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
Hi @AdrienLeGuillou - I addressed the changes you requested. Please let me know if there's anything else that could use updating. Thanks! |
There was a problem hiding this 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
There was a problem hiding this 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!
@AdrienLeGuillou : if all these most recent updates look good, please feel free to merge. Thanks! |
Awesome work @clchand23, thanks! |
New code allows us to specify the race categories for our analysis using
race.level
inbuild_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: