-
Notifications
You must be signed in to change notification settings - Fork 130
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
Bug Report: add_ci.tbl_svysummary()
incorrect levels order
#2036
Comments
add_ci.tbl_svysummary()
incorrect levels order
Hey @ddsjoberg! I investigated this issue and I believe the reorder comes from gtsummary. I ran ard_categorical_ci() from cardx on the |
Thank you @BLalloue for reporting!! Also, thank you @ayogasekaram for looking into the source. I took a look and the
I think the first proposal would be best, but also the most difficult because it would also involve updates to the |
Thank you @BLalloue for the lovely reproducible example! If you could please install the dev version of gtsummary from github and check your use case with the update to ensure the bug is fixed, it would be greatly appreciated. |
Thank you very much for your reply and quick update! |
Hello,
I think there's a problem managing the level order for factors in
add_ci.tbl_svysummary()
. The confidence intervals are not aligned on the lines corresponding to the point estimates and it seems that the same order (alphabetical order ?) is systematically used to display the CIs, even if the factor has levels ordered differently.Here's a repex with first the normal behavior for a tibble and then the abnormal behavior on a survey object.
Created on 2024-10-09 with reprex v2.1.1
Session info
Thank you for all your work and for your help!
The text was updated successfully, but these errors were encountered: