Skip to content

Add CIs for odds ratios from exponentiated logistic regression coefficients#416

Merged
d-morrison merged 6 commits intomainfrom
copilot/add-cis-odds-ratios
Apr 13, 2026
Merged

Add CIs for odds ratios from exponentiated logistic regression coefficients#416
d-morrison merged 6 commits intomainfrom
copilot/add-cis-odds-ratios

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

  • Add a new subsection "#### Confidence intervals for exponentiated coefficients" to _sec_logistic_wald.qmd, showing how to obtain CIs for exp(β_k) by exponentiating the endpoints of the CI for β_k
  • Clarify that for covariate coefficients ($k \neq 0$), $e^{\beta_k}$ is an odds ratio, while for the intercept ($k = 0$), $e^{\beta_0}$ is baseline odds
  • Update R code section text and table caption to reflect that parameters(exponentiate = TRUE) produces exponentiated coefficients (not just ORs)
  • Add "neq" and "exponentiating" to inst/WORDLIST
  • Verify with lint (no issues)
  • Verify with quarto render (succeeds)

Copilot AI changed the title [WIP] Add CIs for the odds ratios corresponding to logistic regression coefficients Add CIs for odds ratios from exponentiated logistic regression coefficients Apr 10, 2026
Copilot AI requested a review from d-morrison April 10, 2026 02:50
Copilot AI review requested due to automatic review settings April 11, 2026 00:21
@d-morrison d-morrison marked this pull request as ready for review April 11, 2026 00:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a focused, “single-coefficient” confidence interval result for odds ratios (via exponentiating a logistic regression coefficient CI) before the more general odds ratio CI derivation elsewhere, and updates the spellcheck WORDLIST accordingly.

Changes:

  • Adds a new subsection deriving a 95% CI for (e^{\beta_k}) by exponentiating the coefficient CI endpoints.
  • Adds an R example table using parameters(exponentiate = TRUE) to report exponentiated estimates and CIs.
  • Adds exponentiating to inst/WORDLIST.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
_sec_logistic_wald.qmd Inserts a new subsection on exponentiated-coefficient (OR) CIs and adds an exponentiated-parameter output table.
inst/WORDLIST Adds exponentiating to the project spellcheck word list.

Comment thread _sec_logistic_wald.qmd Outdated
Comment thread _sec_logistic_wald.qmd Outdated
@d-morrison
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 13, 2026

@copilot apply changes based on the comments in this thread

Applied both review comments in commit 60a1961:

  1. Renamed the subsection to "Confidence intervals for exponentiated coefficients" and added a paragraph clarifying that $e^{\beta_k}$ is an odds ratio for covariate coefficients ($k \neq 0$), but $e^{\beta_0}$ is the baseline odds (not an odds ratio) for the intercept.

  2. Updated the text before the parameters(exponentiate = TRUE) code block to say "report exponentiated coefficients. The intercept is then interpreted as baseline odds, while the non-intercept coefficients are odds ratios:" and updated the table caption to "Exponentiated coefficients and 95% CIs for beetles".

@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1
🚀 Preview available at: https://d-morrison.github.io/rme/pr-preview/pr-416/

Built to branch gh-pages at 2026-04-13 18:31 UTC.

@d-morrison d-morrison merged commit 529f5eb into main Apr 13, 2026
3 checks passed
@d-morrison d-morrison deleted the copilot/add-cis-odds-ratios branch April 13, 2026 18:38
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.

add CIs for the odds ratios corresponding to exponentiated logistic reg coefs

3 participants