-
Notifications
You must be signed in to change notification settings - Fork 29
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
Opinion: survey_prop should default to proportion = TRUE #141
Comments
If I had a time machine and could set it this way from the start I think I agree. I'm less sure that I should do it now that it would change existing code, but maybe it's not so bad. Using github search, I don't think anyone has specified @bschneidr (or anyone else following), do you have an opinion? Maybe I could change but borrow the warning tools from tidyverse, like they do when for
|
I think this is a good suggestion, @szimmer. My sense is that when someone chooses to use Making this update would change code, but I think it's generally for the better. The default "logit" method used by The Wald interval method has long been known to have coverage issues with complex surveys, and a recent simulation study had some pretty strong recommendations against its use:
I guess the only concern here is users might be surprised if their old analysis results become harder to reproduce. I think a temporary warning to use for the next release could be good. Something like: survey_prop <- function(....) {
if (missing(proportion)) {
warning("When `proportion` is unspecified, `survey_prop()` now defaults to `proportion = TRUE`. This should improve confidence interval coverage.")
}
} But using the tidyverse warning tools to only show this once per session. |
I make an issue and start a discussion and then go on vacation! I agree with the warning and can implement later this week if no one else jumps on it first. The type of interval to use as a default is a good question. FWIW, SUDAAN and SAS use xlogit as their default. |
survey_mean
andsurvey_prop
are vary similar. I feel, based on the function name,survey_prop
should default toproportion=TRUE
. Thoughts?The text was updated successfully, but these errors were encountered: