Skip to content

Commit aa5c666

Browse files
ehsanxclaude
andcommitted
Add package-level help page and pkgdown reference grouping
Improves discoverability of the now-16 exported functions: - New ?svyTable1 package-level help page (R/svyTable1-package.R) that groups the functions by purpose (survey design, descriptive tables, model diagnostics, interaction analysis, survival analysis, multiple imputation, data). - _pkgdown.yml gains a matching reference index with the same groupings, and the site URL is given a trailing slash. No code or dependency changes; R CMD check unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 89c4851 commit aa5c666

3 files changed

Lines changed: 186 additions & 1 deletion

File tree

R/svyTable1-package.R

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#' svyTable1: Survey-Weighted Tables and Diagnostics for Epidemiology
2+
#'
3+
#' @description
4+
#' A teaching toolkit for analyzing complex survey data (such as 'NHANES'). The
5+
#' exported functions are organized into the following groups.
6+
#'
7+
#' @section Survey design:
8+
#' \itemize{
9+
#' \item \code{\link{svydesign_build}}: build a survey design from plain column
10+
#' names, with input validation and correct subpopulation handling.
11+
#' }
12+
#'
13+
#' @section Descriptive tables:
14+
#' \itemize{
15+
#' \item \code{\link{svytable1}}: survey-weighted "Table 1" with optional NCHS
16+
#' reliability suppression.
17+
#' }
18+
#'
19+
#' @section Model diagnostics:
20+
#' \itemize{
21+
#' \item \code{\link{svydiag}}: per-coefficient reliability diagnostics.
22+
#' \item \code{\link{svygof}}: Archer-Lemeshow goodness-of-fit test.
23+
#' \item \code{\link{svyAUC}}: design-correct AUC.
24+
#' }
25+
#'
26+
#' @section Interaction analysis:
27+
#' \itemize{
28+
#' \item \code{\link{addint}}, \code{\link{addintlist}}: additive interaction
29+
#' (RERI, AP, S).
30+
#' \item \code{\link{jointeffects}}, \code{\link{inteffects}}: joint and simple
31+
#' (stratum-specific) effects.
32+
#' \item \code{\link{reportint}}: multi-panel interaction report.
33+
#' \item \code{\link{plotint}}: interaction plots for continuous moderators.
34+
#' }
35+
#'
36+
#' @section Survival analysis:
37+
#' \itemize{
38+
#' \item \code{\link{svykmplot}}: survey-weighted Kaplan-Meier plots.
39+
#' \item \code{\link{svycoxph_CE}}, \code{\link{svycoxph_CE_mi}}:
40+
#' constant-effect / proportional-hazards diagnostics.
41+
#' }
42+
#'
43+
#' @section Multiple imputation:
44+
#' \itemize{
45+
#' \item \code{\link{svypooled}}: fallacy-safe pooled tables from \pkg{mice}.
46+
#' }
47+
#'
48+
#' @section Data:
49+
#' \itemize{
50+
#' \item \code{\link{nhanes_mortality}}: bundled NHANES mortality cohort used
51+
#' throughout the examples and vignettes.
52+
#' }
53+
#'
54+
#' @keywords internal
55+
"_PACKAGE"

_pkgdown.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
1-
url: https://ehsanx.github.io/svyTable1
1+
url: https://ehsanx.github.io/svyTable1/
22
template:
33
bootstrap: 5
44

5+
reference:
6+
- title: Survey design
7+
desc: Build and validate a complex-survey design.
8+
contents:
9+
- svydesign_build
10+
- title: Descriptive tables
11+
desc: Survey-weighted "Table 1" summaries.
12+
contents:
13+
- svytable1
14+
- title: Model diagnostics
15+
desc: Assess reliability, fit, and discrimination of survey regression models.
16+
contents:
17+
- svydiag
18+
- svygof
19+
- svyAUC
20+
- title: Interaction analysis
21+
desc: Additive interaction, joint and simple effects, and interaction reports.
22+
contents:
23+
- addint
24+
- addintlist
25+
- jointeffects
26+
- inteffects
27+
- reportint
28+
- plotint
29+
- title: Survival analysis
30+
desc: Survey-weighted Kaplan-Meier plots and proportional-hazards diagnostics.
31+
contents:
32+
- svykmplot
33+
- svycoxph_CE
34+
- svycoxph_CE_mi
35+
- title: Multiple imputation
36+
desc: Pooled, fallacy-safe regression tables.
37+
contents:
38+
- svypooled
39+
- title: Data and helpers
40+
contents:
41+
- nhanes_mortality
42+
- "%>%"

man/svyTable1-package.Rd

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)