Skip to content

Self-contain vignettes/examples on bundled data; label interaction scale#2

Merged
ehsanx merged 1 commit into
mainfrom
improve/vignettes-and-scale
Jun 16, 2026
Merged

Self-contain vignettes/examples on bundled data; label interaction scale#2
ehsanx merged 1 commit into
mainfrom
improve/vignettes-and-scale

Conversation

@ehsanx

@ehsanx ehsanx commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Removes the last dependency on the Suggests-only NHANES package and makes the additive-interaction scale explicit in the output. R CMD check --as-cran --run-donttest remains clean (0 errors, 0 warnings, 1 expected NOTE).

Vignettes (now build without NHANES installed):

  • Convert v1, v2, v3, v5 off NHANESraw onto the bundled nhanes_mortality cohort (hypertension / insulin / caffeine analyses); fix the malformed inline setup chunks in v1 and v2.
  • v4 already used bundled data; guard its mitools (Suggests) use with eval = requireNamespace("mitools", ...) and qualify mitools::imputationList.

Interaction interpretation safety:

  • addintlist() now returns a Scale column ("OR (logistic)", "HR (Cox)", "RR (log-binomial)", "RR (Poisson)", or "ratio") inferred from the model, so the effect-measure scale of RERI/AP/S is visible in the output itself.
  • Document the rare-outcome RR-vs-OR caveat in addint() and addintlist() @details, citing VanderWeele and Knol (2014).

Self-containment:

  • Convert the remaining NHANES examples (addintlist, jointeffects, plotint, svytable1, svydiag) to bundled data; svytable1/svydiag stay runnable (plain) examples, verified fast and lonely-PSU-safe.
  • Drop NHANES from Suggests (no longer referenced anywhere).

Tests: 69 passing (adds Scale-column and svykmplot se = TRUE coverage).

Removes the last dependency on the Suggests-only NHANES package and makes the
additive-interaction scale explicit in the output. R CMD check --as-cran
--run-donttest remains clean (0 errors, 0 warnings, 1 expected NOTE).

Vignettes (now build without NHANES installed):
- Convert v1, v2, v3, v5 off NHANESraw onto the bundled nhanes_mortality cohort
  (hypertension / insulin / caffeine analyses); fix the malformed inline setup
  chunks in v1 and v2.
- v4 already used bundled data; guard its mitools (Suggests) use with
  eval = requireNamespace("mitools", ...) and qualify mitools::imputationList.

Interaction interpretation safety:
- addintlist() now returns a `Scale` column ("OR (logistic)", "HR (Cox)",
  "RR (log-binomial)", "RR (Poisson)", or "ratio") inferred from the model, so
  the effect-measure scale of RERI/AP/S is visible in the output itself.
- Document the rare-outcome RR-vs-OR caveat in addint() and addintlist()
  @details, citing VanderWeele and Knol (2014).

Self-containment:
- Convert the remaining NHANES examples (addintlist, jointeffects, plotint,
  svytable1, svydiag) to bundled data; svytable1/svydiag stay runnable (plain)
  examples, verified fast and lonely-PSU-safe.
- Drop NHANES from Suggests (no longer referenced anywhere).

Tests: 69 passing (adds Scale-column and svykmplot se = TRUE coverage).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ehsanx ehsanx merged commit 0c5f4f4 into main Jun 16, 2026
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