-
Notifications
You must be signed in to change notification settings - Fork 17
Add requested variables and contingency tables #986
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
Hello, we realized that some of the codings in this need to be updated, e.g. |
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.
This is just from an initial look-through; I haven't checked all the variable definitions in detail.
I was hoping that you'd base this off the contingency-tables-fb-sandbox
branch, which already has a lot of these variables defined. Please take a look there to verify your definitions, especially the "hesitant and" ones. The race-based variables are there as well.
I believe Alex sent an email about this, but race is stripped from the microdata because of privacy concerns. To get race, you'll need to use the raw data.
Did you get a chance to run this and compare the output to existing tables?
we realized that some of the codings in this need to be updated, e.g. hcw should be "Healthcare worker" rather than 1
I think hcw
is supposed to be boolean, so it seems fine.
5eb7954
to
2a4ada5
Compare
@davidkretch Hold off on rebasing/merging this into the contingency-table-fb-sandbox branch, I'm sending an email with more info. |
2a4ada5
to
ac66aaa
Compare
bfb22c8
to
1b358be
Compare
* Add v0.2 grouping and indicator variables In contingency_variables.R, add all v0.2 grouping and indicator variables, and reorganize the variables to be in the same order as they appear in the requirements spreadsheet for easy checking. * Add v0.2 contingency tables In contingency_indicators.R, add definitions for all v0.2 indicators for the requested contingency tables, e.g. nation, nation/age, etc.
1b358be
to
a556542
Compare
This has now been updated with the changes discussed over the last week. |
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.
Some definitional issues and some items defined here already exist in variables.R
. We should just rename those items to save computational effort. There are a couple things I want to check in with Sarah about and I'll follow up when possible.
aa657e8
to
85327cb
Compare
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.
Some variable + comment clean-up.
Co-authored-by: nmdefries <[email protected]>
Co-authored-by: nmdefries <[email protected]>
Co-authored-by: nmdefries <[email protected]>
I've made the requested updates and verified that the updated version's output matches the previous version with the exception of the contingency table for grouping variable |
Co-authored-by: nmdefries <[email protected]>
This is looking great!! I'm just going to run this on my own machine and compare to previous table output. |
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.
A couple details and then this is good to go! All calculations except pct_vaccinated
matched tables produced by my current code 👍
Co-authored-by: nmdefries <[email protected]>
Co-authored-by: nmdefries <[email protected]>
@capnrefsmmat Could you merge this as well? |
Description
Add the requested v0.2 variables and contingency tables from the new contingency tables requirements document.
I have compared the results of this version with the version on main and the
vaccinated
andconcerned_sideeffects
(nowworried_vaccine_sideeffects
) match exactly. I compared results for survey responses submitted 3/21-3/27 at the state/age (now agefull) level.One issue I noticed: the
pct_cli
andpct_ili
metrics, which usecompute_numeric
, do not receive standard errors.Changelog
In
contingency_variables.R
, add v0.2 grouping and indicator variables and new names/categories. Reorganize all variables to match the order in the requirements spreadsheet for easy checking.In
contingency_indicators.R
, add all requested contingency tables by region and group (e.g. nation, state, age, gender, etc.) and all requested indicators, e.g. vaccinated, hesitant, etc.