From 4e9f10524358d09a553d19ff5ebd2008f202a14f Mon Sep 17 00:00:00 2001 From: choxos Date: Fri, 18 Sep 2026 10:27:23 -0400 Subject: [PATCH] Load mlumr and ggplot2 once per vignette Six vignettes repeated library(mlumr) and library(ggplot2) at the top of the worked example after the setup chunk had already loaded them. The repeat is removed from the precompile sources and the knitted files. --- vignettes/binary-outcomes.Rmd | 3 --- vignettes/binary-outcomes.Rmd.orig | 3 --- vignettes/choosing-a-method.Rmd | 1 - vignettes/choosing-a-method.Rmd.orig | 1 - vignettes/continuous-outcomes.Rmd | 3 --- vignettes/continuous-outcomes.Rmd.orig | 3 --- vignettes/count-outcomes.Rmd | 3 --- vignettes/count-outcomes.Rmd.orig | 3 --- vignettes/fitting-and-diagnostics.Rmd | 1 - vignettes/fitting-and-diagnostics.Rmd.orig | 1 - vignettes/survival-outcomes.Rmd | 3 --- vignettes/survival-outcomes.Rmd.orig | 3 --- 12 files changed, 28 deletions(-) diff --git a/vignettes/binary-outcomes.Rmd b/vignettes/binary-outcomes.Rmd index 4b0a17b3..1ec163a4 100644 --- a/vignettes/binary-outcomes.Rmd +++ b/vignettes/binary-outcomes.Rmd @@ -95,9 +95,6 @@ informs the comparator intercept, whereas STC regresses on the IPD alone.) ``` r -library(mlumr) -library(ggplot2) - # IPD + AgD bundled with mlumr (copied from multinma's plaque_psoriasis, GPL-3). data("psoriasis_ipd") data("psoriasis_agd") diff --git a/vignettes/binary-outcomes.Rmd.orig b/vignettes/binary-outcomes.Rmd.orig index f52427d1..a2974fb5 100644 --- a/vignettes/binary-outcomes.Rmd.orig +++ b/vignettes/binary-outcomes.Rmd.orig @@ -116,9 +116,6 @@ still differ: ML-UMR fits a joint likelihood in which the aggregate outcome informs the comparator intercept, whereas STC regresses on the IPD alone.) ```{r data} -library(mlumr) -library(ggplot2) - # IPD + AgD bundled with mlumr (copied from multinma's plaque_psoriasis, GPL-3). data("psoriasis_ipd") data("psoriasis_agd") diff --git a/vignettes/choosing-a-method.Rmd b/vignettes/choosing-a-method.Rmd index 7fcfc684..6c884fdd 100644 --- a/vignettes/choosing-a-method.Rmd +++ b/vignettes/choosing-a-method.Rmd @@ -48,7 +48,6 @@ secukinumab) with three prognostic covariates: ``` r -library(mlumr) data("psoriasis_ipd") # bundled with mlumr (from multinma, GPL-3) data("psoriasis_agd") diff --git a/vignettes/choosing-a-method.Rmd.orig b/vignettes/choosing-a-method.Rmd.orig index 6d6dd95f..21d2b760 100644 --- a/vignettes/choosing-a-method.Rmd.orig +++ b/vignettes/choosing-a-method.Rmd.orig @@ -69,7 +69,6 @@ the plaque-psoriasis PASI 75 endpoint (UNCOVER-2 ixekizumab vs FIXTURE secukinumab) with three prognostic covariates: ```{r data} -library(mlumr) data("psoriasis_ipd") # bundled with mlumr (from multinma, GPL-3) data("psoriasis_agd") diff --git a/vignettes/continuous-outcomes.Rmd b/vignettes/continuous-outcomes.Rmd index da4a831b..0423603a 100644 --- a/vignettes/continuous-outcomes.Rmd +++ b/vignettes/continuous-outcomes.Rmd @@ -79,9 +79,6 @@ mlumr precisely because no aggregation bias arises from a nonlinear link ``` r -library(mlumr) -library(ggplot2) - data("shoulder_ipd") # index IPD (ASD), bundled with mlumr data("shoulder_agd") # comparator AgD (ET) diff --git a/vignettes/continuous-outcomes.Rmd.orig b/vignettes/continuous-outcomes.Rmd.orig index a631d73a..c578e09d 100644 --- a/vignettes/continuous-outcomes.Rmd.orig +++ b/vignettes/continuous-outcomes.Rmd.orig @@ -100,9 +100,6 @@ mlumr precisely because no aggregation bias arises from a nonlinear link (contrast the log odds ratio in `vignette("binary-outcomes")`). ```{r data} -library(mlumr) -library(ggplot2) - data("shoulder_ipd") # index IPD (ASD), bundled with mlumr data("shoulder_agd") # comparator AgD (ET) diff --git a/vignettes/count-outcomes.Rmd b/vignettes/count-outcomes.Rmd index df2f517c..dd222f6c 100644 --- a/vignettes/count-outcomes.Rmd +++ b/vignettes/count-outcomes.Rmd @@ -77,9 +77,6 @@ $\mathrm{RR}=\bar\lambda_{\text{index}}/\bar\lambda_{\text{comparator}}$ ``` r -library(mlumr) -library(ggplot2) - data("caries_ipd") # index IPD (SDF), bundled with mlumr data("caries_agd") # comparator AgD (NSF) diff --git a/vignettes/count-outcomes.Rmd.orig b/vignettes/count-outcomes.Rmd.orig index bf63cd78..b4a97a09 100644 --- a/vignettes/count-outcomes.Rmd.orig +++ b/vignettes/count-outcomes.Rmd.orig @@ -98,9 +98,6 @@ $\mathrm{RR}=\bar\lambda_{\text{index}}/\bar\lambda_{\text{comparator}}$ (null = 1), reported in both populations. ```{r data} -library(mlumr) -library(ggplot2) - data("caries_ipd") # index IPD (SDF), bundled with mlumr data("caries_agd") # comparator AgD (NSF) diff --git a/vignettes/fitting-and-diagnostics.Rmd b/vignettes/fitting-and-diagnostics.Rmd index c42c6438..db0220da 100644 --- a/vignettes/fitting-and-diagnostics.Rmd +++ b/vignettes/fitting-and-diagnostics.Rmd @@ -37,7 +37,6 @@ in `vignette("binary-outcomes")`): ``` r -library(mlumr) data("psoriasis_ipd") # bundled with mlumr (from multinma, GPL-3) data("psoriasis_agd") diff --git a/vignettes/fitting-and-diagnostics.Rmd.orig b/vignettes/fitting-and-diagnostics.Rmd.orig index e5718986..48e79d5e 100644 --- a/vignettes/fitting-and-diagnostics.Rmd.orig +++ b/vignettes/fitting-and-diagnostics.Rmd.orig @@ -58,7 +58,6 @@ of this vignette inspects, tunes, and diagnoses (the data preparation is covered in `vignette("binary-outcomes")`): ```{r data} -library(mlumr) data("psoriasis_ipd") # bundled with mlumr (from multinma, GPL-3) data("psoriasis_agd") diff --git a/vignettes/survival-outcomes.Rmd b/vignettes/survival-outcomes.Rmd index dd03bcef..554eb17c 100644 --- a/vignettes/survival-outcomes.Rmd +++ b/vignettes/survival-outcomes.Rmd @@ -131,9 +131,6 @@ We adjust for age, ISS stage III, complete/very-good-partial response, and sex. ``` r -library(mlumr) -library(ggplot2) - data("ndmm_ipd") # bundled with mlumr (copied from multinma, GPL-3) data("ndmm_agd") # reconstructed pseudo-IPD (KM) data("ndmm_agd_covs") # covariate moments for the AgD arm diff --git a/vignettes/survival-outcomes.Rmd.orig b/vignettes/survival-outcomes.Rmd.orig index f41fb08a..c9b10f9a 100644 --- a/vignettes/survival-outcomes.Rmd.orig +++ b/vignettes/survival-outcomes.Rmd.orig @@ -151,9 +151,6 @@ Surv(lower, upper, type = "interval2") # interval censoring We adjust for age, ISS stage III, complete/very-good-partial response, and sex. ```{r data} -library(mlumr) -library(ggplot2) - data("ndmm_ipd") # bundled with mlumr (copied from multinma, GPL-3) data("ndmm_agd") # reconstructed pseudo-IPD (KM) data("ndmm_agd_covs") # covariate moments for the AgD arm