Some sample scripts
Author

Sir Panda

Published

November 11, 2018

Code
library(mgcv) # Fit and interrogate GAMs
library(tidyverse) # Tidy and flexible data manipulation
library(marginaleffects) # Compute conditional and marginal effects
library(ggplot2) # Flexible plotting
library(patchwork) # Combining ggplot objects


plant <- CO2 |>
  as_tibble() |>
  rename(plant = Plant, type = Type, treatment = Treatment) |>
  mutate(plant = factor(plant, ordered = FALSE))

Code
model_1 <- gam(
  uptake ~ treatment * type +
    s(plant, bs = "re") +
    s(conc, by = treatment, k = 7),
  data = plant,
  method = "REML",
  family = Gamma(link = "log")
)
summary(model_1)

Family: Gamma 
Link function: log 

Formula:
uptake ~ treatment * type + s(plant, bs = "re") + s(conc, by = treatment, 
    k = 7)

Parametric coefficients:
                                 Estimate Std. Error t value Pr(>|t|)    
(Intercept)                        3.5161     0.0638   55.14  < 2e-16 ***
treatmentchilled                  -0.1132     0.0902   -1.26  0.21399    
typeMississippi                   -0.3120     0.0902   -3.46  0.00098 ***
treatmentchilled:typeMississippi  -0.3604     0.1275   -2.83  0.00631 ** 
---
Signif. codes:  0***0.001**0.01*0.05 ‘.’ 0.1 ‘ ’ 1

Approximate significance of smooth terms:
                             edf Ref.df     F p-value    
s(plant)                    7.03   8.00  8.02  <2e-16 ***
s(conc):treatmentnonchilled 5.19   5.68 83.89  <2e-16 ***
s(conc):treatmentchilled    5.01   5.55 58.97  <2e-16 ***
---
Signif. codes:  0***0.001**0.01*0.05 ‘.’ 0.1 ‘ ’ 1

R-sq.(adj) =  0.957   Deviance explained = 95.5%
-REML = 239.08  Scale est. = 0.010327  n = 84
coef(model_1)
                     (Intercept)                 treatmentchilled                  typeMississippi 
                         3.51609                         -0.11321                         -0.31196 
treatmentchilled:typeMississippi                       s(plant).1                       s(plant).2 
                        -0.36041                         -0.04123                         -0.01529 
                      s(plant).3                       s(plant).4                       s(plant).5 
                         0.05652                         -0.04010                          0.02693 
                      s(plant).6                       s(plant).7                       s(plant).8 
                         0.01317                         -0.05593                          0.04989 
                      s(plant).9                      s(plant).10                      s(plant).11 
                         0.00604                         -0.21558                          0.09712 
                     s(plant).12    s(conc):treatmentnonchilled.1    s(conc):treatmentnonchilled.2 
                         0.11846                          5.23232                          1.13324 
   s(conc):treatmentnonchilled.3    s(conc):treatmentnonchilled.4    s(conc):treatmentnonchilled.5 
                        -1.90483                          0.12919                          0.23606 
   s(conc):treatmentnonchilled.6       s(conc):treatmentchilled.1       s(conc):treatmentchilled.2 
                         1.20260                          3.69059                          2.11750 
      s(conc):treatmentchilled.3       s(conc):treatmentchilled.4       s(conc):treatmentchilled.5 
                        -2.36770                          0.06347                          0.23654 
      s(conc):treatmentchilled.6 
                         0.96775

Code
plot(model_1, select = 2, shade = TRUE)
abline(h = 0, lty = "dashed")


Code
plot_predictions(model_1,
  condition = "conc",
  type = "link"
) +
  labs(
    y = "Linear predictor (link scale)",
    title = "Average smooth effect of concentration",
    subtitle = "Aggregated across treatments and types"
  )


Code
plot_predictions(model_1,
  condition = c("conc", "treatment", "type"),
  type = "link"
) +
  labs(
    y = "Linear predictor (link scale)",
    title = "Average smooth effect of concentration",
    subtitle = "Per treatment, per type"
  )


Code
plot_slopes(model_1,
  variables = "conc",
  condition = c("conc", "treatment"),
  type = "link"
) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  labs(
    y = "1st derivative of the linear predictor",
    title = "Conditional slopes of the concentration effect",
    subtitle = "Per treatment, per type"
  )

Code
plot_predictions(model_1,
  condition = "conc",
  type = "response", points = 0.5,
  rug = TRUE
) +
  labs(
    y = "Expected response",
    title = "Average smooth effect of concentration",
    subtitle = "Aggregated across treatments and types"
  )

Code
plot_predictions(model_1,
  condition = c("conc", "treatment", "type"),
  type = "response", points = 0.5,
  rug = TRUE
) +
  labs(
    y = "Expected response",
    title = "Average smooth effect of concentration",
    subtitle = "Per treatment, per type"
  )

Code
plot_slopes(model_1,
  variables = "conc",
  condition = c("conc", "treatment", "type"),
  type = "response"
) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  labs(
    y = "1st derivative of the expected response",
    title = "Conditional slopes of the concentration effect",
    subtitle = "Per treatment, per type"
  )


Code
Xp <- predict(model_1, type = "lpmatrix")
dim(Xp)
[1] 84 28
colnames(Xp)
 [1] "(Intercept)"                      "treatmentchilled"                 "typeMississippi"                 
 [4] "treatmentchilled:typeMississippi" "s(plant).1"                       "s(plant).2"                      
 [7] "s(plant).3"                       "s(plant).4"                       "s(plant).5"                      
[10] "s(plant).6"                       "s(plant).7"                       "s(plant).8"                      
[13] "s(plant).9"                       "s(plant).10"                      "s(plant).11"                     
[16] "s(plant).12"                      "s(conc):treatmentnonchilled.1"    "s(conc):treatmentnonchilled.2"   
[19] "s(conc):treatmentnonchilled.3"    "s(conc):treatmentnonchilled.4"    "s(conc):treatmentnonchilled.5"   
[22] "s(conc):treatmentnonchilled.6"    "s(conc):treatmentchilled.1"       "s(conc):treatmentchilled.2"      
[25] "s(conc):treatmentchilled.3"       "s(conc):treatmentchilled.4"       "s(conc):treatmentchilled.5"      
[28] "s(conc):treatmentchilled.6"
beta <- coef(model_1)
all.equal(names(beta), colnames(Xp))
[1] TRUE

Code
preds <- as.vector(Xp %*% beta)
all.equal(fitted(model_1), exp(preds))
[1] TRUE
newXp <- predict(model_1,
  type = "lpmatrix",
  newdata = data.frame(
    plant = "Qn1",
    treatment = "nonchilled",
    type = "Mississippi",
    conc = 278
  )
)
dim(newXp)
[1]  1 28
exp(newXp %*% beta)
  [,1]
1 27.6

Code
conc_seq <- seq(from = min(plant$conc), max(plant$conc), length.out = 500)
newdat <- data.frame(
  conc = conc_seq,
  plant = "Qn1",
  treatment = "nonchilled",
  type = "Mississippi"
)
newXp <- predict(model_1, type = "lpmatrix", newdata = newdat)
conc_coefs <- model_1$smooth[[2]]$first.para:model_1$smooth[[2]]$last.para
conc_coefs
[1] 17 18 19 20 21 22

Trace plot of imputed datasets.

Python


Code
model_2 <- glm(
  uptake ~ treatment * type +
    poly(conc, 4) * treatment + plant,
  data = plant,
  family = Gamma(link = "log")
)
plot_predictions(model_1,
  condition = c("conc", "treatment", "type"),
  type = "response", points = 0.5,
  rug = TRUE
) +
  labs(
    y = "Expected response",
    title = "Average smooth effect of concentration",
    subtitle = "Per treatment, per type"
  )

Code
plot_predictions(model_2,
  condition = c("conc", "treatment", "type"),
  type = "response", points = 0.5,
  rug = TRUE
) +
  labs(
    y = "Expected response",
    title = "Average smooth effect of concentration",
    subtitle = "Per treatment, per type"
  )


R


Code
avg_comparisons(model_1,
  newdata = datagrid(
    conc = conc_seq,
    treatment = unique,
    type = unique
  ),
  variables = "treatment",
  by = "type"
)

        type Estimate Std. Error     z Pr(>|z|)    S 2.5 % 97.5 %
 Quebec         -4.76       3.04 -1.57    0.117  3.1 -10.7   1.19
 Mississippi   -10.71       2.20 -4.87   <0.001 19.8 -15.0  -6.40

Term: treatment
Type: response
Comparison: chilled - nonchilled
avg_comparisons(model_1,
  newdata = datagrid(
    conc = conc_seq,
    treatment = unique,
    type = unique
  ),
  variables = "treatment",
  by = c("conc", "type")
)

   conc        type Estimate Std. Error      z Pr(>|z|)    S  2.5 % 97.5 %
   95.0 Quebec         0.413       1.60  0.258  0.79644  0.3  -2.73   3.55
   95.0 Mississippi   -3.114       1.02 -3.057  0.00224  8.8  -5.11  -1.12
   96.8 Quebec         0.373       1.61  0.232  0.81662  0.3  -2.78   3.53
   96.8 Mississippi   -3.183       1.03 -3.102  0.00192  9.0  -5.19  -1.17
   98.6 Quebec         0.332       1.62  0.205  0.83731  0.3  -2.84   3.51
--- 990 rows omitted. See ?print.marginaleffects ---
  996.4 Mississippi  -11.426       2.75 -4.156  < 0.001 14.9 -16.81  -6.04
  998.2 Quebec        -4.436       3.97 -1.119  0.26334  1.9 -12.21   3.34
  998.2 Mississippi  -11.427       2.76 -4.147  < 0.001 14.9 -16.83  -6.03
 1000.0 Quebec        -4.435       3.98 -1.115  0.26467  1.9 -12.23   3.36
 1000.0 Mississippi  -11.428       2.76 -4.138  < 0.001 14.8 -16.84  -6.02
Term: treatment
Type: response
Comparison: chilled - nonchilled
plot_comparisons(model_1,
  newdata = datagrid(
    conc = conc_seq,
    treatment = unique,
    type = unique
  ),
  variables = "treatment",
  by = c("conc", "type"),
  type = "link"
) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  labs(
    y = "Estimated difference",
    title = "Difference between treatment levels",
    subtitle = "Chilled - nonchilled, per type"
  )


Stata


Code
max_growth <- function(hi, lo, x) {
  dydx <- (hi - lo) / 1e-6
  dydx_max <- max(dydx)
  x[dydx == dydx_max][1]
}

comparisons(model_1,
  newdata = datagrid(
    conc = conc_seq,
    treatment = unique,
    type = unique
  ),
  variables = list("conc" = 1e-6),
  vcov = FALSE,
  by = "treatment",
  comparison = max_growth
)

  treatment Estimate
 nonchilled      157
 chilled         151

Term: conc
Type: response
Comparison: +1e-06
hypotheses(slopes(model_1,
  newdata = datagrid(
    conc = conc_seq,
    treatment = unique,
    type = unique
  ),
  variables = "conc",
  by = c("conc", "treatment"),
  type = "link"
)) %>%
  dplyr::filter(p.value <= 0.05)

 Estimate Std. Error    z Pr(>|z|)    S    2.5 %  97.5 %
  0.00809   0.000876 9.23   <0.001 65.0 6.37e-03 0.00980
  0.00647   0.000830 7.79   <0.001 47.1 4.84e-03 0.00810
  0.00809   0.000877 9.22   <0.001 64.9 6.37e-03 0.00980
  0.00647   0.000829 7.81   <0.001 47.3 4.84e-03 0.00809
  0.00808   0.000876 9.22   <0.001 64.9 6.37e-03 0.00980
--- 196 rows omitted. See ?print.marginaleffects ---
  0.00127   0.000503 2.53   0.0115  6.4 2.85e-04 0.00226
  0.00122   0.000518 2.36   0.0184  5.8 2.06e-04 0.00224
  0.00117   0.000523 2.25   0.0247  5.3 1.49e-04 0.00220
  0.00113   0.000530 2.12   0.0337  4.9 8.69e-05 0.00217
  0.00108   0.000542 1.99   0.0465  4.4 1.69e-05 0.00214
Term: conc

Computational Environments


Overall Platforms


Code
sessioninfo::session_info(info = c("platform", "external"))
─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.6.1 (2026-06-24)
 os       macOS Tahoe 26.5.1
 system   aarch64, darwin25.4.0
 ui       unknown
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2026-06-26
 pandoc   NA (via rmarkdown)
 quarto   1.9.38 @ /usr/local/bin/quarto

─ External software ────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting        value
 cairo          1.18.4
 cairoFT        2.14.3/2.18.1
 pango
 png
 jpeg
 tiff
 tcl            9.0
 curl           8.7.1
 zlib           1.2.12
 bzlib          1.0.8, 13-Jul-2019
 xz             5.8.3
 deflate
 zstd           1.5.7
 PCRE           10.47 2025-10-21
 ICU            78.1
 TRE            TRE 0.8.0 R_fixes (BSD)
 iconv          Apple or GNU libiconv 1.11 /usr/lib/libiconv.2.dylib
 readline       8.3
 BLAS           /opt/homebrew/Cellar/openblas/0.3.33/lib/libopenblasp-r0.3.33.dylib
 lapack         /opt/homebrew/Cellar/r/4.6.1/lib/R/lib/libRlapack.dylib
 lapack_version 3.12.1

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

R Packages


Code
sessioninfo::session_info(info = "packages")
═ Session info ═════════════════════════════════════════════════════════════════════════════════════════════════════════════════
─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package           * version   date (UTC) lib source
 abind               1.4-8     2024-09-12 [1] CRAN (R 4.6.0)
 Amelia            * 1.8.3     2024-11-08 [1] CRAN (R 4.6.0)
 arm                 1.15-3    2026-04-15 [1] CRAN (R 4.6.0)
 arrayhelpers        1.1-0     2020-02-04 [1] CRAN (R 4.6.0)
 backports           1.5.1     2026-04-03 [1] CRAN (R 4.6.0)
 base64enc           0.1-6     2026-02-02 [1] CRAN (R 4.6.0)
 bayesplot         * 1.15.0    2025-12-12 [1] CRAN (R 4.6.1)
 bbotk               1.10.1    2026-06-13 [1] CRAN (R 4.6.0)
 bitops              1.0-9     2024-10-03 [1] CRAN (R 4.6.0)
 blogdown          * 1.24      2026-06-19 [1] CRAN (R 4.6.1)
 boot              * 1.3-32    2025-08-29 [1] CRAN (R 4.6.1)
 bootImpute        * 1.3.0     2025-12-15 [1] CRAN (R 4.6.1)
 bridgesampling      1.2-1     2025-11-19 [1] CRAN (R 4.6.0)
 brms              * 2.23.0    2025-09-09 [1] CRAN (R 4.6.1)
 Brobdingnag         1.2-9     2022-10-19 [1] CRAN (R 4.6.0)
 broom             * 1.0.13    2026-05-14 [1] CRAN (R 4.6.0)
 broom.mixed       * 0.2.9.7   2026-02-17 [1] CRAN (R 4.6.0)
 Cairo             * 1.7-0     2025-10-29 [1] CRAN (R 4.6.1)
 callr               3.8.0     2026-06-05 [1] CRAN (R 4.6.1)
 car               * 3.1-5     2026-02-03 [1] CRAN (R 4.6.0)
 carData           * 3.0-6     2026-01-30 [1] CRAN (R 4.6.1)
 caTools             1.18.3    2024-09-04 [1] CRAN (R 4.6.0)
 checkmate         * 2.3.4     2026-02-03 [1] CRAN (R 4.6.0)
 class               7.3-23    2025-01-01 [1] CRAN (R 4.6.0)
 cli                 3.6.6     2026-04-09 [1] CRAN (R 4.6.1)
 clipr               0.8.1     2026-05-25 [1] CRAN (R 4.6.0)
 cluster             2.1.8.2   2026-02-05 [1] CRAN (R 4.6.0)
 coda              * 0.19-4.1  2024-01-31 [1] CRAN (R 4.6.1)
 codetools           0.2-20    2024-03-31 [1] CRAN (R 4.6.0)
 colorspace        * 2.1-2     2025-09-22 [1] CRAN (R 4.6.0)
 concurve          * 3.0.0     2026-06-23 [1] local
 cowplot           * 1.2.0     2025-07-07 [1] CRAN (R 4.6.1)
 crayon              1.5.3     2024-06-20 [1] CRAN (R 4.6.0)
 curl                7.1.0     2026-04-22 [1] CRAN (R 4.6.0)
 data.table          1.18.4    2026-05-06 [1] CRAN (R 4.6.1)
 DBI                 1.3.0     2026-02-25 [1] CRAN (R 4.6.1)
 DEoptimR            1.2-0     2026-06-07 [1] CRAN (R 4.6.0)
 desc                1.4.3     2023-12-10 [1] CRAN (R 4.6.0)
 details             0.4.0     2025-02-09 [1] CRAN (R 4.6.0)
 dichromat           2.0-0.1   2022-05-02 [1] CRAN (R 4.6.0)
 digest              0.6.39    2025-11-19 [1] CRAN (R 4.6.0)
 distributional      0.8.0     2026-06-23 [1] CRAN (R 4.6.0)
 doParallel        * 1.0.17    2022-02-07 [1] CRAN (R 4.6.1)
 doRNG               1.8.6.3   2026-02-05 [1] CRAN (R 4.6.0)
 dplyr             * 1.2.1     2026-04-03 [1] CRAN (R 4.6.1)
 e1071               1.7-17    2025-12-18 [1] CRAN (R 4.6.0)
 emmeans             2.0.3     2026-04-09 [1] CRAN (R 4.6.0)
 estimability        1.5.1     2024-05-12 [1] CRAN (R 4.6.0)
 evaluate            1.0.5     2025-08-27 [1] CRAN (R 4.6.0)
 extremevalues       2.4.1     2024-12-17 [1] CRAN (R 4.6.0)
 farver              2.1.2     2024-05-13 [1] CRAN (R 4.6.0)
 fastmap             1.2.0     2024-05-15 [1] CRAN (R 4.6.0)
 forcats           * 1.0.1     2025-09-25 [1] CRAN (R 4.6.0)
 foreach           * 1.5.2     2022-02-02 [1] CRAN (R 4.6.1)
 foreign             0.8-91    2026-01-29 [1] CRAN (R 4.6.1)
 Formula             1.2-5     2023-02-24 [1] CRAN (R 4.6.0)
 fs                  2.1.0     2026-04-18 [1] CRAN (R 4.6.1)
 furrr               0.4.0     2026-03-31 [1] CRAN (R 4.6.0)
 future            * 1.70.0    2026-03-14 [1] CRAN (R 4.6.1)
 future.apply      * 1.20.2    2026-02-20 [1] CRAN (R 4.6.0)
 gamlss            * 5.5-0     2025-08-19 [1] CRAN (R 4.6.1)
 gamlss.data       * 6.0-7     2025-09-04 [1] CRAN (R 4.6.0)
 gamlss.dist       * 6.1-1     2023-08-23 [1] CRAN (R 4.6.0)
 generics            0.1.4     2025-05-09 [1] CRAN (R 4.6.0)
 ggcorrplot        * 0.1.4.1   2023-09-05 [1] CRAN (R 4.6.0)
 ggdist              3.3.3     2025-04-23 [1] CRAN (R 4.6.0)
 ggplot2           * 4.0.3     2026-04-22 [1] CRAN (R 4.6.1)
 ggtext            * 0.1.2     2022-09-16 [1] CRAN (R 4.6.1)
 glmnet              5.0       2026-05-04 [1] CRAN (R 4.6.1)
 globals             0.19.1    2026-03-13 [1] CRAN (R 4.6.0)
 glue                1.8.1     2026-04-17 [1] CRAN (R 4.6.1)
 gridExtra           2.3       2017-09-09 [1] CRAN (R 4.6.1)
 gridtext            0.1.6     2026-02-19 [1] CRAN (R 4.6.0)
 gtable              0.3.6     2024-10-25 [1] CRAN (R 4.6.0)
 here              * 1.0.2     2025-09-15 [1] CRAN (R 4.6.1)
 Hmisc             * 5.2-6     2026-06-19 [1] CRAN (R 4.6.1)
 hms                 1.1.4     2025-10-17 [1] CRAN (R 4.6.0)
 htmlTable           2.5.0     2026-04-22 [1] CRAN (R 4.6.0)
 htmltools         * 0.5.9     2025-12-04 [1] CRAN (R 4.6.1)
 htmlwidgets         1.6.4     2023-12-06 [1] CRAN (R 4.6.1)
 httr                1.4.8     2026-02-13 [1] CRAN (R 4.6.0)
 ImputeRobust      * 1.3-1     2018-11-30 [1] CRAN (R 4.6.1)
 inline              0.3.21    2025-01-09 [1] CRAN (R 4.6.0)
 insight             1.5.1     2026-05-21 [1] CRAN (R 4.6.0)
 iterators         * 1.0.14    2022-02-05 [1] CRAN (R 4.6.0)
 itertools           0.1-3     2014-03-12 [1] CRAN (R 4.6.0)
 jomo                2.7-6     2023-04-15 [1] CRAN (R 4.6.0)
 jsonlite            2.0.0     2025-03-27 [1] CRAN (R 4.6.1)
 JuliaCall         * 0.17.6    2024-12-07 [1] CRAN (R 4.6.0)
 kableExtra        * 1.4.0     2024-01-24 [1] CRAN (R 4.6.1)
 knitr             * 1.51      2025-12-20 [1] CRAN (R 4.6.1)
 labeling            0.4.3     2023-08-29 [1] CRAN (R 4.6.0)
 laeken              0.5.3     2024-01-25 [1] CRAN (R 4.6.0)
 latex2exp         * 0.9.8     2026-01-09 [1] CRAN (R 4.6.0)
 lattice           * 0.22-9    2026-02-09 [1] CRAN (R 4.6.1)
 lgr                 0.5.2     2026-01-30 [1] CRAN (R 4.6.0)
 lifecycle           1.0.5     2026-01-08 [1] CRAN (R 4.6.0)
 listenv             1.0.0     2026-06-22 [1] CRAN (R 4.6.0)
 lme4                2.0-1     2026-03-05 [1] CRAN (R 4.6.1)
 lmtest              0.9-40    2022-03-21 [1] CRAN (R 4.6.0)
 loo               * 2.9.0     2025-12-23 [1] CRAN (R 4.6.1)
 lubridate         * 1.9.5     2026-02-04 [1] CRAN (R 4.6.1)
 magick              2.9.1     2026-02-28 [1] CRAN (R 4.6.1)
 magrittr          * 2.0.5     2026-04-04 [1] CRAN (R 4.6.1)
 marginaleffects   * 0.32.0    2026-02-14 [1] CRAN (R 4.6.0)
 MASS              * 7.3-65    2025-02-28 [1] CRAN (R 4.6.1)
 Matrix            * 1.7-5     2026-03-21 [1] CRAN (R 4.6.0)
 MatrixModels        0.5-4     2025-03-26 [1] CRAN (R 4.6.0)
 matrixStats         1.5.0     2025-01-07 [1] CRAN (R 4.6.0)
 mcmc                0.9-8     2023-11-16 [1] CRAN (R 4.6.0)
 MCMCpack          * 1.7-1     2024-08-27 [1] CRAN (R 4.6.0)
 mgcv              * 1.9-4     2025-11-07 [1] CRAN (R 4.6.0)
 mi                * 1.2       2025-09-02 [1] CRAN (R 4.6.0)
 mice              * 3.19.0    2025-12-10 [1] CRAN (R 4.6.1)
 miceadds          * 3.20-10   2026-05-28 [1] CRAN (R 4.6.0)
 miceFast          * 0.9.1     2026-02-26 [1] CRAN (R 4.6.0)
 minqa               1.2.8     2024-08-17 [1] CRAN (R 4.6.0)
 missForest        * 1.6.1     2025-10-26 [1] CRAN (R 4.6.0)
 mitml             * 0.4-5     2023-03-08 [1] CRAN (R 4.6.0)
 mitools             2.4       2019-04-26 [1] CRAN (R 4.6.0)
 mlr3                1.7.1     2026-06-11 [1] CRAN (R 4.6.0)
 mlr3learners        0.15.0    2026-06-09 [1] CRAN (R 4.6.0)
 mlr3misc            0.22.0    2026-06-10 [1] CRAN (R 4.6.0)
 mlr3pipelines       0.11.0    2026-03-01 [1] CRAN (R 4.6.0)
 mlr3tuning          1.6.0     2026-03-16 [1] CRAN (R 4.6.0)
 moocore             0.3.1     2026-05-04 [1] CRAN (R 4.6.0)
 multcomp            1.4-30    2026-03-09 [1] CRAN (R 4.6.0)
 mvtnorm           * 1.4-1     2026-06-06 [1] CRAN (R 4.6.1)
 nlme              * 3.1-169   2026-03-27 [1] CRAN (R 4.6.1)
 nloptr              2.2.1     2025-03-17 [1] CRAN (R 4.6.0)
 nnet                7.3-20    2025-01-01 [1] CRAN (R 4.6.0)
 opdisDownsampling   1.6       2026-06-25 [1] CRAN (R 4.6.1)
 otel                0.2.0     2025-08-29 [1] CRAN (R 4.6.0)
 palmerpenguins      0.1.1     2022-08-15 [1] CRAN (R 4.6.0)
 pan                 1.9       2023-12-07 [1] CRAN (R 4.6.0)
 pander              0.6.7     2026-06-25 [1] Github (rapporter/pander@987bf71)
 paradox             1.0.1     2024-07-09 [1] CRAN (R 4.6.0)
 parallelly        * 1.47.0    2026-04-17 [1] CRAN (R 4.6.0)
 patchwork         * 1.3.2     2025-08-25 [1] CRAN (R 4.6.1)
 pbmcapply         * 1.5.1     2022-04-28 [1] CRAN (R 4.6.0)
 performance       * 0.17.0    2026-05-21 [1] CRAN (R 4.6.0)
 pillar              1.11.1    2025-09-17 [1] CRAN (R 4.6.0)
 pkgbuild            1.4.8     2025-05-26 [1] CRAN (R 4.6.1)
 pkgconfig           2.0.3     2019-09-22 [1] CRAN (R 4.6.0)
 plyr                1.8.9     2023-10-02 [1] CRAN (R 4.6.1)
 png                 0.1-9     2026-03-15 [1] CRAN (R 4.6.0)
 polspline           1.1.25    2024-05-10 [1] CRAN (R 4.6.0)
 posterior         * 1.7.0     2026-04-01 [1] CRAN (R 4.6.0)
 pracma              2.4.6     2025-10-22 [1] CRAN (R 4.6.0)
 prettyunits         1.2.0     2023-09-24 [1] CRAN (R 4.6.0)
 processx            3.9.0     2026-04-22 [1] CRAN (R 4.6.0)
 ProfileLikelihood * 1.3       2023-08-25 [1] CRAN (R 4.6.1)
 progress          * 1.2.3     2023-12-06 [1] CRAN (R 4.6.0)
 proxy               0.4-29    2025-12-29 [1] CRAN (R 4.6.0)
 purrr             * 1.2.2     2026-04-10 [1] CRAN (R 4.6.1)
 qqconf              1.3.2     2023-04-14 [1] CRAN (R 4.6.0)
 qqplotr           * 0.0.7     2025-09-05 [1] CRAN (R 4.6.0)
 quantreg          * 6.1       2025-03-10 [1] CRAN (R 4.6.1)
 QuickJSR            1.10.0    2026-05-17 [1] CRAN (R 4.6.0)
 R6                  2.6.1     2025-02-15 [1] CRAN (R 4.6.1)
 randomForest      * 4.7-1.2   2024-09-22 [1] CRAN (R 4.6.0)
 ranger              0.18.0    2026-01-16 [1] CRAN (R 4.6.0)
 rapportools         1.2       2025-02-28 [1] CRAN (R 4.6.0)
 rbibutils           2.4.1     2026-01-21 [1] CRAN (R 4.6.0)
 rcartocolor         2.1.2     2025-07-23 [1] CRAN (R 4.6.0)
 RColorBrewer        1.1-3     2022-04-03 [1] CRAN (R 4.6.1)
 Rcpp              * 1.1.1-1.1 2026-04-24 [1] CRAN (R 4.6.1)
 RcppParallel        5.1.11-2  2026-03-05 [1] CRAN (R 4.6.0)
 Rdpack              2.6.6     2026-02-08 [1] CRAN (R 4.6.0)
 readr             * 2.2.0     2026-02-19 [1] CRAN (R 4.6.1)
 reformulas          0.4.4     2026-02-02 [1] CRAN (R 4.6.0)
 rematch2            2.1.2     2020-05-01 [1] CRAN (R 4.6.0)
 reshape2          * 1.4.5     2025-11-12 [1] CRAN (R 4.6.1)
 reticulate        * 1.46.0    2026-04-09 [1] CRAN (R 4.6.1)
 rlang               1.2.0     2026-04-06 [1] CRAN (R 4.6.1)
 rmarkdown         * 2.31      2026-03-26 [1] CRAN (R 4.6.1)
 rms               * 8.1-1     2026-02-18 [1] CRAN (R 4.6.1)
 rngtools            1.5.2     2021-09-20 [1] CRAN (R 4.6.0)
 robustbase          0.99-7    2026-02-05 [1] CRAN (R 4.6.0)
 rpart               4.1.27    2026-03-27 [1] CRAN (R 4.6.0)
 rprojroot           2.1.1     2025-08-26 [1] CRAN (R 4.6.0)
 rstan             * 2.32.7    2025-03-10 [1] CRAN (R 4.6.1)
 rstantools          2.6.0     2026-01-10 [1] CRAN (R 4.6.1)
 rstudioapi          0.19.0    2026-06-11 [1] CRAN (R 4.6.1)
 S7                  0.2.2     2026-04-22 [1] CRAN (R 4.6.0)
 sandwich            3.1-1     2024-09-15 [1] CRAN (R 4.6.1)
 scales              1.4.0     2025-04-24 [1] CRAN (R 4.6.1)
 sessioninfo         1.2.4     2026-06-04 [1] CRAN (R 4.6.0)
 shape               1.4.6.1   2024-02-23 [1] CRAN (R 4.6.0)
 showtext          * 0.9-8     2026-03-21 [1] CRAN (R 4.6.1)
 showtextdb        * 3.0       2020-06-04 [1] CRAN (R 4.6.0)
 sp                  2.2-1     2026-02-13 [1] CRAN (R 4.6.0)
 SparseM           * 1.84-2    2024-07-17 [1] CRAN (R 4.6.0)
 StanHeaders       * 2.32.10   2024-07-15 [1] CRAN (R 4.6.1)
 Statamarkdown     * 0.9.6     2025-10-07 [1] CRAN (R 4.6.1)
 stringi             1.8.7     2025-03-27 [1] CRAN (R 4.6.1)
 stringr           * 1.6.0     2025-11-04 [1] CRAN (R 4.6.1)
 summarytools      * 1.1.5     2026-06-25 [1] Github (dcomtois/summarytools@2b613cf)
 survival            3.8-6     2026-01-16 [1] CRAN (R 4.6.1)
 svglite           * 2.2.2     2025-10-21 [1] CRAN (R 4.6.1)
 svgPanZoom          0.3.4     2020-02-15 [1] CRAN (R 4.6.0)
 svUnit              1.0.8     2025-08-26 [1] CRAN (R 4.6.0)
 sysfonts          * 0.8.9     2024-03-02 [1] CRAN (R 4.6.1)
 systemfonts         1.3.2     2026-03-05 [1] CRAN (R 4.6.1)
 tensorA             0.36.2.1  2023-12-13 [1] CRAN (R 4.6.0)
 texPreview        * 2.1.0     2024-01-24 [1] CRAN (R 4.6.0)
 textshaping         1.0.5     2026-03-06 [1] CRAN (R 4.6.0)
 TH.data             1.1-5     2025-11-17 [1] CRAN (R 4.6.0)
 tibble            * 3.3.1     2026-01-11 [1] CRAN (R 4.6.1)
 tidybayes         * 3.0.7     2024-09-15 [1] CRAN (R 4.6.0)
 tidyr             * 1.3.2     2025-12-19 [1] CRAN (R 4.6.1)
 tidyselect          1.2.1     2024-03-11 [1] CRAN (R 4.6.0)
 tidyverse         * 2.0.0     2023-02-22 [1] CRAN (R 4.6.1)
 timechange          0.4.0     2026-01-29 [1] CRAN (R 4.6.0)
 tinytex           * 0.60      2026-06-16 [1] CRAN (R 4.6.1)
 twosamples          2.0.1     2023-06-23 [1] CRAN (R 4.6.0)
 tzdb                0.5.0     2025-03-15 [1] CRAN (R 4.6.0)
 uuid                1.2-2     2026-01-23 [1] CRAN (R 4.6.0)
 V8                  8.2.0     2026-04-21 [1] CRAN (R 4.6.0)
 vcd                 1.4-13    2024-09-16 [1] CRAN (R 4.6.0)
 vctrs               0.7.3     2026-04-11 [1] CRAN (R 4.6.0)
 VIM               * 7.0.0     2026-01-10 [1] CRAN (R 4.6.0)
 viridisLite         0.4.3     2026-02-04 [1] CRAN (R 4.6.0)
 wesanderson       * 0.3.7     2023-10-31 [1] CRAN (R 4.6.0)
 whisker             0.4.1     2022-12-05 [1] CRAN (R 4.6.1)
 withr               3.0.3     2026-06-19 [1] CRAN (R 4.6.1)
 xfun              * 0.59      2026-06-19 [1] CRAN (R 4.6.1)
 xml2                1.6.0     2026-06-22 [1] CRAN (R 4.6.1)
 xtable              1.8-8     2026-02-22 [1] CRAN (R 4.6.1)
 yaml                2.3.12    2025-12-10 [1] CRAN (R 4.6.1)
 yardstick         * 1.4.0     2026-04-07 [1] CRAN (R 4.6.1)
 zoo                 1.8-15    2025-12-15 [1] CRAN (R 4.6.0)

 [1] /opt/homebrew/lib/R/4.6/site-library
 [2] /opt/homebrew/Cellar/r/4.6.1/lib/R/library
 * ── Packages attached to the search path.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

References


Back to top

Comments