Skip to content
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

Add user error message for missing strata #224

Open
kristinawlai opened this issue Jul 24, 2024 · 3 comments · May be fixed by #227
Open

Add user error message for missing strata #224

kristinawlai opened this issue Jul 24, 2024 · 3 comments · May be fixed by #227
Assignees
Labels
feature a feature request or enhancement

Comments

@kristinawlai
Copy link
Collaborator

Add a user error message that alerts user of missing data in strata variable for est.incidence.by(). Would it make sense to add functionality to exclude rows with missing strata, but still allow it to run? Current error is below in an example stratifying on district:

image

@kristinawlai
Copy link
Collaborator Author

@kaiemjoy, after you left today's call we discussed this issue of how to handle missing values in strata variables for est.incidence.by(). We came up with 3 options:

  1. Run the estimates, but automatically exclude NAs and produce a warning message that indicates there were X (xx%) missing values within the strata variable, and prompt the user to make sure that is expected. As a reminder, we discussed this last week and noted that users might just run the estimates without reading the warning messages.
  2. Don't run the estimates and produce an error message that indicates there were X (xx%) missing values within the strata variable, and prompt the user to remove or recategorize the missing values before attempting to calculate the estimates again.
  3. Run the estimates and automatically create an additional strata level for the missing values. (Ezra mentioned that the user could do this themselves if they want and that we may not want to assume what the user wants to do)

On the call, the rest of us were preferring option 1, but we really wanted your input. What do you think?

@kristinawlai
Copy link
Collaborator Author

@chrisorwa I haven't been able to replicate the same errors I was getting previously (on my desktop or in Posit), so maybe some of your prior updates have already fixed it. est.incidence.by() seems to already create a separate strata and reports an incidence estimate for NAs as well as each level of the strata variable. We can see what @kaiemjoy thinks is the preferred action. I will continue to play with the unpublished dataset that I'm not able to share to see if I can figure out what the difference is.

image

@chrisorwa
Copy link
Collaborator

Thanks @kristinawlai

@d-morrison d-morrison added feature a feature request or enhancement and removed enhancement labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants