Skip to content

Pass conf_level to the proportion confidence intervals in lsmeans() - #88

Open
chenyangsu wants to merge 1 commit into
insightsengineering:mainfrom
chenyangsu:fix/lsmeans-prop-ci-level
Open

chenyangsu wants to merge 1 commit into
insightsengineering:mainfrom
chenyangsu:fix/lsmeans-prop-ci-level

Conversation

@chenyangsu

Copy link
Copy Markdown

Pull Request

lsmeans(fit, conf_level = 0.8) returns 95% bounds for prop_lower_cl/prop_upper_cl because confint(prop_emm) is called without level; only the odds ratio CI uses conf_level. With summarize_gee_logistic() the table labels the row "80% CI" but prints (0.84, 0.92) for PBO; the 80% interval from emmeans is (0.86, 0.91).

The fix passes level = conf_level, and a new test compares the bounds with confint(emmeans(...), level = 0.8). Happy to add a NEWS entry once #87 is in.

Testing: devtools::test() 48 passed, 0 failed; the new test fails on main.

@github-actions

Copy link
Copy Markdown
Contributor


🎉 Thank you for your contribution! Before this PR can be accepted, we require that you read and agree to our Contributor License Agreement.
You can digitally sign the CLA by posting a comment on this Pull Request in the format shown below. This agreement will apply to this PR as well as all future contributions on this repository.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant