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))
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
plot(model_1, select = 2, shade = TRUE)
abline(h = 0, lty = "dashed")
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"
)
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"
)
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"
)
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"
)
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"
)
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"
)
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
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
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

Python
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"
)
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"
)
#> Warning: Model matrix is rank deficient. Some variance-covariance parameters are missing.
R
avg_comparisons(model_1,
newdata = datagrid(
conc = conc_seq,
treatment = unique,
type = unique
),
variables = "treatment",
by = "type"
)
#>
#> Term type Estimate Std. Error z Pr(>|z|) S 2.5 % 97.5 %
#> treatment Quebec -4.76 3.04 -1.57 0.117 3.1 -10.7 1.19
#> treatment Mississippi -10.71 2.20 -4.87 <0.001 19.8 -15.0 -6.40
#>
#> Type: response
#> Comparison: mean(chilled) - mean(nonchilled)
#> Columns: term, contrast, type, estimate, std.error, statistic, p.value, s.value, conf.low, conf.high, predicted_lo, predicted_hi, predicted
avg_comparisons(model_1,
newdata = datagrid(
conc = conc_seq,
treatment = unique,
type = unique
),
variables = "treatment",
by = c("conc", "type")
)
#>
#> Term conc type Estimate Std. Error z Pr(>|z|) S 2.5 % 97.5 %
#> treatment 95.0 Quebec 0.413 1.60 0.258 0.79644 0.3 -2.73 3.55
#> treatment 95.0 Mississippi -3.114 1.02 -3.057 0.00224 8.8 -5.11 -1.12
#> treatment 96.8 Quebec 0.373 1.61 0.232 0.81662 0.3 -2.78 3.53
#> treatment 96.8 Mississippi -3.183 1.03 -3.102 0.00192 9.0 -5.19 -1.17
#> treatment 98.6 Quebec 0.332 1.62 0.205 0.83731 0.3 -2.84 3.51
#> --- 990 rows omitted. See ?print.marginaleffects ---
#> treatment 996.4 Mississippi -11.426 2.75 -4.156 < 0.001 14.9 -16.81 -6.04
#> treatment 998.2 Quebec -4.436 3.97 -1.119 0.26334 1.9 -12.21 3.34
#> treatment 998.2 Mississippi -11.427 2.76 -4.147 < 0.001 14.9 -16.83 -6.03
#> treatment 1000.0 Quebec -4.435 3.98 -1.115 0.26467 1.9 -12.23 3.36
#> treatment 1000.0 Mississippi -11.428 2.76 -4.138 < 0.001 14.8 -16.84 -6.02
#> Type: response
#> Comparison: mean(chilled) - mean(nonchilled)
#> Columns: term, contrast, conc, type, estimate, std.error, statistic, p.value, s.value, conf.low, conf.high, predicted_lo, predicted_hi, predicted
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
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
#> Columns: term, contrast, treatment, estimate
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)
#>
#> Term conc treatment Estimate Std. Error z Pr(>|z|) S 2.5 % 97.5 %
#> conc 95.0 nonchilled 0.00809 0.000876 9.23 <0.001 65.0 6.37e-03 0.00980
#> conc 95.0 chilled 0.00647 0.000828 7.81 <0.001 47.3 4.85e-03 0.00809
#> conc 96.8 nonchilled 0.00809 0.000878 9.21 <0.001 64.8 6.37e-03 0.00981
#> conc 96.8 chilled 0.00647 0.000829 7.80 <0.001 47.2 4.84e-03 0.00809
#> conc 98.6 nonchilled 0.00808 0.000874 9.25 <0.001 65.2 6.37e-03 0.00980
#> --- 196 rows omitted. See ?print.marginaleffects ---
#> conc 278.2 nonchilled 0.00127 0.000507 2.51 0.0122 6.4 2.78e-04 0.00227
#> conc 280.0 nonchilled 0.00122 0.000521 2.35 0.0190 5.7 2.01e-04 0.00224
#> conc 281.8 nonchilled 0.00117 0.000522 2.25 0.0246 5.3 1.50e-04 0.00220
#> conc 283.6 nonchilled 0.00113 0.000536 2.10 0.0357 4.8 7.50e-05 0.00218
#> conc 285.4 nonchilled 0.00108 0.000546 1.98 0.0482 4.4 8.71e-06 0.00215
#> Type: link
#> Comparison: mean(dY/dX)
#> Columns: term, contrast, conc, treatment, estimate, std.error, statistic, p.value, s.value, conf.low, conf.high, predicted_lo, predicted_hi, predicted
Computational Environments
Overall Platforms
sessioninfo::session_info(info = c("platform", "external"))
#> Error in info != "auto" && info != "all": 'length = 2' in coercion to 'logical(1)'
R
Packages
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.4.1)
#> Amelia * 1.8.2 2024-04-23 [1] CRAN (R 4.4.0)
#> arm 1.14-4 2024-04-01 [1] CRAN (R 4.4.0)
#> arrayhelpers 1.1-0 2020-02-04 [1] CRAN (R 4.4.0)
#> askpass 1.2.0 2023-09-03 [1] CRAN (R 4.4.0)
#> backports 1.5.0 2024-05-23 [1] CRAN (R 4.4.0)
#> base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.4.0)
#> bayesplot * 1.11.1 2024-02-15 [1] CRAN (R 4.4.0)
#> bcaboot 0.2-3 2021-05-09 [1] CRAN (R 4.4.0)
#> bitops 1.0-8 2024-07-29 [1] CRAN (R 4.4.0)
#> blogdown * 1.19.1 2024-08-17 [1] Github (rstudio/blogdown@c6e73fb)
#> bookdown 0.40 2024-07-02 [1] CRAN (R 4.4.0)
#> boot * 1.3-31 2024-08-28 [1] CRAN (R 4.4.1)
#> bootImpute * 1.2.1 2023-06-01 [1] CRAN (R 4.4.0)
#> bridgesampling 1.1-2 2021-04-16 [1] CRAN (R 4.4.0)
#> brms * 2.21.0 2024-03-20 [1] CRAN (R 4.4.0)
#> Brobdingnag 1.2-9 2022-10-19 [1] CRAN (R 4.4.0)
#> broom * 1.0.6 2024-05-17 [1] CRAN (R 4.4.0)
#> broom.mixed * 0.2.9.5 2024-04-01 [1] CRAN (R 4.4.0)
#> bslib 0.8.0 2024-07-29 [1] CRAN (R 4.4.0)
#> cachem 1.1.0 2024-05-16 [1] CRAN (R 4.4.0)
#> Cairo * 1.6-2 2023-11-28 [1] CRAN (R 4.4.0)
#> callr 3.7.6 2024-03-25 [1] CRAN (R 4.4.0)
#> car * 3.1-2 2023-03-30 [1] CRAN (R 4.4.0)
#> carData * 3.0-5 2022-01-06 [1] CRAN (R 4.4.0)
#> caTools 1.18.3 2024-09-04 [1] CRAN (R 4.4.1)
#> checkmate * 2.3.2 2024-07-29 [1] CRAN (R 4.4.0)
#> class 7.3-22 2023-05-03 [1] CRAN (R 4.4.0)
#> cli 3.6.3 2024-06-21 [1] CRAN (R 4.4.0)
#> clipr 0.8.0 2022-02-22 [1] CRAN (R 4.4.0)
#> cluster 2.1.6 2023-12-01 [1] CRAN (R 4.4.0)
#> coda * 0.19-4.1 2024-01-31 [1] CRAN (R 4.4.0)
#> codetools 0.2-20 2024-03-31 [1] CRAN (R 4.4.0)
#> colorspace * 2.1-1 2024-07-26 [1] CRAN (R 4.4.0)
#> concurve * 2.8.0 2024-07-12 [1] local
#> cowplot * 1.1.3 2024-01-22 [1] CRAN (R 4.4.0)
#> crayon 1.5.3 2024-06-20 [1] CRAN (R 4.4.0)
#> curl 5.2.2 2024-08-26 [1] CRAN (R 4.4.1)
#> data.table 1.16.0 2024-08-27 [1] CRAN (R 4.4.1)
#> DBI 1.2.3 2024-06-02 [1] CRAN (R 4.4.0)
#> DEoptimR 1.1-3 2023-10-07 [1] CRAN (R 4.4.0)
#> desc 1.4.3 2023-12-10 [1] CRAN (R 4.4.0)
#> details 0.3.0 2022-03-27 [1] CRAN (R 4.4.0)
#> digest 0.6.37 2024-08-19 [1] CRAN (R 4.4.1)
#> distributional 0.4.0 2024-02-07 [1] CRAN (R 4.4.0)
#> doParallel * 1.0.17 2022-02-07 [1] CRAN (R 4.4.0)
#> doRNG 1.8.6 2023-01-16 [1] CRAN (R 4.4.0)
#> dplyr * 1.1.4 2023-11-17 [1] CRAN (R 4.4.0)
#> e1071 1.7-16 2024-09-16 [1] CRAN (R 4.4.1)
#> emmeans 1.10.4 2024-08-21 [1] CRAN (R 4.4.1)
#> estimability 1.5.1 2024-05-12 [1] CRAN (R 4.4.0)
#> evaluate 0.24.0 2024-06-10 [1] CRAN (R 4.4.0)
#> extremevalues 2.3.4 2024-02-13 [1] CRAN (R 4.4.0)
#> fansi 1.0.6 2023-12-08 [1] CRAN (R 4.4.0)
#> farver 2.1.2 2024-05-13 [1] CRAN (R 4.4.0)
#> fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.4.0)
#> flextable 0.9.6 2024-05-05 [1] CRAN (R 4.4.0)
#> fontBitstreamVera 0.1.1 2017-02-01 [1] CRAN (R 4.4.0)
#> fontLiberation 0.1.0 2016-10-15 [1] CRAN (R 4.4.0)
#> fontquiver 0.2.1 2017-02-01 [1] CRAN (R 4.4.0)
#> forcats * 1.0.0 2023-01-29 [1] CRAN (R 4.4.0)
#> foreach * 1.5.2 2022-02-02 [1] CRAN (R 4.4.0)
#> foreign 0.8-87 2024-06-26 [1] CRAN (R 4.4.0)
#> Formula 1.2-5 2023-02-24 [1] CRAN (R 4.4.0)
#> fs 1.6.4 2024-04-25 [1] CRAN (R 4.4.0)
#> furrr 0.3.1 2022-08-15 [1] CRAN (R 4.4.0)
#> future * 1.34.0 2024-07-29 [1] CRAN (R 4.4.0)
#> future.apply * 1.11.2 2024-03-28 [1] CRAN (R 4.4.0)
#> gamlss * 5.4-22 2024-03-20 [1] CRAN (R 4.4.0)
#> gamlss.data * 6.0-6 2024-03-14 [1] CRAN (R 4.4.0)
#> gamlss.dist * 6.1-1 2023-08-23 [1] CRAN (R 4.4.0)
#> gdtools 0.4.0 2024-08-28 [1] CRAN (R 4.4.1)
#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.4.0)
#> ggcorrplot * 0.1.4.1 2023-09-05 [1] CRAN (R 4.4.0)
#> ggdist 3.3.2 2024-03-05 [1] CRAN (R 4.4.0)
#> ggplot2 * 3.5.1 2024-04-23 [1] CRAN (R 4.4.0)
#> ggpubr 0.6.0 2023-02-10 [1] CRAN (R 4.4.0)
#> ggsignif 0.6.4 2022-10-13 [1] CRAN (R 4.4.0)
#> ggtext * 0.1.2 2022-09-16 [1] CRAN (R 4.4.0)
#> glmnet 4.1-8 2023-08-22 [1] CRAN (R 4.4.0)
#> globals 0.16.3 2024-03-08 [1] CRAN (R 4.4.0)
#> glue 1.7.0 2024-01-09 [1] CRAN (R 4.4.0)
#> gridExtra 2.3 2017-09-09 [1] CRAN (R 4.4.0)
#> gridtext 0.1.5 2022-09-16 [1] CRAN (R 4.4.0)
#> gtable 0.3.5 2024-04-22 [1] CRAN (R 4.4.0)
#> gWidgets2 1.0-9 2022-01-10 [1] CRAN (R 4.4.0)
#> gWidgets2tcltk 1.0-8 2022-02-16 [1] CRAN (R 4.4.0)
#> here * 1.0.1 2020-12-13 [1] CRAN (R 4.4.0)
#> highr 0.11.1 2024-06-25 [1] https://yihui.r-universe.dev (R 4.4.0)
#> Hmisc * 5.1-3 2024-05-28 [1] CRAN (R 4.4.0)
#> hms 1.1.3 2023-03-21 [1] CRAN (R 4.4.0)
#> htmlTable 2.4.3 2024-07-21 [1] CRAN (R 4.4.0)
#> htmltools * 0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0)
#> htmlwidgets 1.6.4 2023-12-06 [1] CRAN (R 4.4.0)
#> httr 1.4.7 2023-08-15 [1] CRAN (R 4.4.0)
#> ImputeRobust * 1.3-1 2018-11-30 [1] CRAN (R 4.4.0)
#> inline 0.3.19 2021-05-31 [1] CRAN (R 4.4.0)
#> insight 0.20.4 2024-09-01 [1] CRAN (R 4.4.1)
#> iterators * 1.0.14 2022-02-05 [1] CRAN (R 4.4.0)
#> itertools 0.1-3 2014-03-12 [1] CRAN (R 4.4.0)
#> jomo 2.7-6 2023-04-15 [1] CRAN (R 4.4.0)
#> jquerylib 0.1.4 2021-04-26 [1] CRAN (R 4.4.0)
#> jsonlite 1.8.8 2023-12-04 [1] CRAN (R 4.4.0)
#> JuliaCall * 0.17.5 2022-09-08 [1] CRAN (R 4.4.0)
#> kableExtra * 1.4.0 2024-01-24 [1] CRAN (R 4.4.0)
#> km.ci 0.5-6 2022-04-06 [1] CRAN (R 4.4.0)
#> KMsurv 0.1-5 2012-12-03 [1] CRAN (R 4.4.0)
#> knitr * 1.48.1 2024-07-12 [1] https://yihui.r-universe.dev (R 4.4.0)
#> labeling 0.4.3 2023-08-29 [1] CRAN (R 4.4.0)
#> laeken 0.5.3 2024-01-25 [1] CRAN (R 4.4.0)
#> latex2exp * 0.9.6 2022-11-28 [1] CRAN (R 4.4.0)
#> lattice * 0.22-6 2024-03-20 [1] CRAN (R 4.4.0)
#> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.4.0)
#> listenv 0.9.1 2024-01-29 [1] CRAN (R 4.4.0)
#> lme4 1.1-35.5 2024-07-03 [1] CRAN (R 4.4.0)
#> lmtest 0.9-40 2022-03-21 [1] CRAN (R 4.4.0)
#> loo * 2.8.0 2024-07-03 [1] CRAN (R 4.4.0)
#> lubridate * 1.9.3 2023-09-27 [1] CRAN (R 4.4.0)
#> magick 2.8.4 2024-07-12 [1] https://ropensci.r-universe.dev (R 4.4.0)
#> magrittr * 2.0.3 2022-03-30 [1] CRAN (R 4.4.0)
#> marginaleffects * 0.22.0 2024-08-31 [1] CRAN (R 4.4.1)
#> MASS * 7.3-61 2024-06-13 [1] CRAN (R 4.4.0)
#> mathjaxr 1.6-0 2022-02-28 [1] CRAN (R 4.4.0)
#> Matrix * 1.7-0 2024-03-22 [1] CRAN (R 4.4.0)
#> MatrixModels 0.5-3 2023-11-06 [1] CRAN (R 4.4.0)
#> matrixStats 1.4.1 2024-09-08 [1] CRAN (R 4.4.1)
#> mcmc 0.9-8 2023-11-16 [1] CRAN (R 4.4.0)
#> MCMCpack * 1.7-1 2024-08-27 [1] CRAN (R 4.4.1)
#> memoise 2.0.1 2021-11-26 [1] CRAN (R 4.4.0)
#> metadat 1.2-0 2022-04-06 [1] CRAN (R 4.4.0)
#> metafor 4.6-0 2024-03-28 [1] CRAN (R 4.4.0)
#> mgcv * 1.9-1 2023-12-21 [1] CRAN (R 4.4.0)
#> mi * 1.1 2022-06-06 [1] CRAN (R 4.4.0)
#> mice * 3.16.0 2023-06-05 [1] CRAN (R 4.4.0)
#> miceadds * 3.17-44 2024-01-09 [1] CRAN (R 4.4.0)
#> miceFast * 0.8.2 2022-11-17 [1] CRAN (R 4.4.0)
#> minqa 1.2.8 2024-08-17 [1] CRAN (R 4.4.0)
#> missForest * 1.5 2022-04-14 [1] CRAN (R 4.4.0)
#> mitml * 0.4-5 2023-03-08 [1] CRAN (R 4.4.0)
#> mitools 2.4 2019-04-26 [1] CRAN (R 4.4.0)
#> multcomp 1.4-26 2024-07-18 [1] CRAN (R 4.4.0)
#> munsell 0.5.1 2024-04-01 [1] CRAN (R 4.4.0)
#> mvtnorm * 1.3-1 2024-09-03 [1] CRAN (R 4.4.1)
#> nlme * 3.1-166 2024-08-14 [1] CRAN (R 4.4.0)
#> nloptr 2.1.1 2024-06-25 [1] CRAN (R 4.4.0)
#> nnet 7.3-19 2023-05-03 [1] CRAN (R 4.4.0)
#> numDeriv 2016.8-1.1 2019-06-06 [1] CRAN (R 4.4.0)
#> officer 0.6.6 2024-05-05 [1] CRAN (R 4.4.0)
#> opdisDownsampling 1.0.1 2024-04-15 [1] CRAN (R 4.4.0)
#> openssl 2.2.1 2024-08-16 [1] CRAN (R 4.4.0)
#> pan 1.9 2023-12-07 [1] CRAN (R 4.4.0)
#> pander 0.6.5 2022-03-18 [1] CRAN (R 4.4.0)
#> parallelly * 1.38.0 2024-07-27 [1] CRAN (R 4.4.0)
#> patchwork * 1.3.0 2024-09-16 [1] CRAN (R 4.4.1)
#> pbmcapply * 1.5.1 2022-04-28 [1] CRAN (R 4.4.0)
#> performance * 0.12.3 2024-09-02 [1] CRAN (R 4.4.1)
#> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.4.0)
#> pkgbuild 1.4.4 2024-03-17 [1] CRAN (R 4.4.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.4.0)
#> plyr 1.8.9 2023-10-02 [1] CRAN (R 4.4.0)
#> png 0.1-8 2022-11-29 [1] CRAN (R 4.4.0)
#> polspline 1.1.25 2024-05-10 [1] CRAN (R 4.4.0)
#> posterior * 1.6.0 2024-07-03 [1] CRAN (R 4.4.0)
#> pracma 2.4.4 2023-11-10 [1] CRAN (R 4.4.0)
#> prettyunits 1.2.0 2023-09-24 [1] CRAN (R 4.4.0)
#> processx 3.8.4 2024-03-16 [1] CRAN (R 4.4.0)
#> ProfileLikelihood * 1.3 2023-08-25 [1] CRAN (R 4.4.0)
#> progress * 1.2.3 2023-12-06 [1] CRAN (R 4.4.0)
#> proxy 0.4-27 2022-06-09 [1] CRAN (R 4.4.0)
#> pryr 0.1.6 2023-01-17 [1] CRAN (R 4.4.0)
#> ps 1.8.0 2024-09-12 [1] CRAN (R 4.4.1)
#> purrr * 1.0.2 2023-08-10 [1] CRAN (R 4.4.0)
#> qqconf 1.3.2 2023-04-14 [1] CRAN (R 4.4.0)
#> qqplotr * 0.0.6 2023-01-25 [1] CRAN (R 4.4.0)
#> quantreg * 5.98 2024-05-26 [1] CRAN (R 4.4.0)
#> QuickJSR 1.3.1 2024-07-14 [1] CRAN (R 4.4.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.4.0)
#> ragg 1.3.3 2024-09-11 [1] CRAN (R 4.4.1)
#> randomForest * 4.7-1.1 2022-05-23 [1] CRAN (R 4.4.0)
#> ranger 0.16.0 2023-11-12 [1] CRAN (R 4.4.0)
#> rapportools 1.1 2022-03-22 [1] CRAN (R 4.4.0)
#> rcartocolor 2.1.1 2023-05-13 [1] CRAN (R 4.4.0)
#> Rcpp * 1.0.13 2024-07-17 [1] CRAN (R 4.4.0)
#> RcppParallel 5.1.9 2024-08-19 [1] CRAN (R 4.4.1)
#> readr * 2.1.5 2024-01-10 [1] CRAN (R 4.4.0)
#> rematch2 2.1.2 2020-05-01 [1] CRAN (R 4.4.0)
#> reshape2 * 1.4.4 2020-04-09 [1] CRAN (R 4.4.0)
#> reticulate * 1.39.0 2024-09-05 [1] CRAN (R 4.4.1)
#> rlang 1.1.4 2024-06-04 [1] CRAN (R 4.4.0)
#> rmarkdown * 2.28 2024-08-17 [1] CRAN (R 4.4.0)
#> rms * 6.8-2 2024-08-23 [1] CRAN (R 4.4.1)
#> rngtools 1.5.2 2021-09-20 [1] CRAN (R 4.4.0)
#> robustbase 0.99-4 2024-08-19 [1] CRAN (R 4.4.1)
#> rpart 4.1.23 2023-12-05 [1] CRAN (R 4.4.0)
#> rprojroot 2.0.4 2023-11-05 [1] CRAN (R 4.4.0)
#> rstan * 2.32.6 2024-03-05 [1] CRAN (R 4.4.0)
#> rstantools 2.4.0 2024-01-31 [1] CRAN (R 4.4.0)
#> rstatix 0.7.2 2023-02-01 [1] CRAN (R 4.4.0)
#> rstudioapi 0.16.0 2024-03-24 [1] CRAN (R 4.4.0)
#> sandwich 3.1-1 2024-09-15 [1] CRAN (R 4.4.1)
#> sass 0.4.9 2024-03-15 [1] CRAN (R 4.4.0)
#> scales 1.3.0 2023-11-28 [1] CRAN (R 4.4.0)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.4.0)
#> shape 1.4.6.1 2024-02-23 [1] CRAN (R 4.4.0)
#> showtext * 0.9-7 2024-03-02 [1] CRAN (R 4.4.0)
#> showtextdb * 3.0 2020-06-04 [1] CRAN (R 4.4.0)
#> sp 2.1-4 2024-04-30 [1] CRAN (R 4.4.0)
#> SparseM * 1.84-2 2024-07-17 [1] CRAN (R 4.4.0)
#> StanHeaders * 2.32.10 2024-07-15 [1] CRAN (R 4.4.0)
#> Statamarkdown * 0.9.2 2023-12-04 [1] CRAN (R 4.4.0)
#> stringi 1.8.4 2024-05-06 [1] CRAN (R 4.4.0)
#> stringr * 1.5.1 2023-11-14 [1] CRAN (R 4.4.0)
#> summarytools * 1.0.1 2022-05-20 [1] CRAN (R 4.4.0)
#> survival 3.7-0 2024-06-05 [1] CRAN (R 4.4.0)
#> survminer 0.4.9 2021-03-09 [1] CRAN (R 4.4.0)
#> survMisc 0.5.6 2022-04-07 [1] CRAN (R 4.4.0)
#> svglite * 2.1.3 2023-12-08 [1] CRAN (R 4.4.0)
#> svgPanZoom 0.3.4 2020-02-15 [1] CRAN (R 4.4.0)
#> svUnit 1.0.6 2021-04-19 [1] CRAN (R 4.4.0)
#> sysfonts * 0.8.9 2024-03-02 [1] CRAN (R 4.4.0)
#> systemfonts 1.1.0 2024-05-15 [1] CRAN (R 4.4.0)
#> tensorA 0.36.2.1 2023-12-13 [1] CRAN (R 4.4.0)
#> texPreview * 2.1.0 2024-01-24 [1] CRAN (R 4.4.0)
#> textshaping 0.4.0 2024-05-24 [1] CRAN (R 4.4.0)
#> TH.data 1.1-2 2023-04-17 [1] CRAN (R 4.4.0)
#> tibble * 3.2.1 2023-03-20 [1] CRAN (R 4.4.0)
#> tidybayes * 3.0.7 2024-09-15 [1] CRAN (R 4.4.1)
#> tidyr * 1.3.1 2024-01-24 [1] CRAN (R 4.4.0)
#> tidyselect 1.2.1 2024-03-11 [1] CRAN (R 4.4.0)
#> tidyverse * 2.0.0 2023-02-22 [1] CRAN (R 4.4.0)
#> timechange 0.3.0 2024-01-18 [1] CRAN (R 4.4.0)
#> tinytex * 0.53 2024-09-15 [1] CRAN (R 4.4.1)
#> twosamples 2.0.1 2023-06-23 [1] CRAN (R 4.4.0)
#> tzdb 0.4.0 2023-05-12 [1] CRAN (R 4.4.0)
#> utf8 1.2.4 2023-10-22 [1] CRAN (R 4.4.0)
#> uuid 1.2-1 2024-07-29 [1] CRAN (R 4.4.0)
#> V8 5.0.0 2024-08-16 [1] CRAN (R 4.4.0)
#> vcd 1.4-13 2024-09-16 [1] CRAN (R 4.4.1)
#> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.4.0)
#> VIM * 6.2.2 2022-08-25 [1] CRAN (R 4.4.0)
#> viridisLite 0.4.2 2023-05-02 [1] CRAN (R 4.4.0)
#> wesanderson * 0.3.7 2023-10-31 [1] CRAN (R 4.4.0)
#> whisker 0.4.1 2022-12-05 [1] CRAN (R 4.4.0)
#> withr 3.0.1 2024-07-31 [1] CRAN (R 4.4.0)
#> xfun * 0.47 2024-08-17 [1] CRAN (R 4.4.0)
#> xml2 1.3.6 2023-12-04 [1] CRAN (R 4.4.0)
#> xtable 1.8-4 2019-04-21 [1] CRAN (R 4.4.0)
#> yaml 2.3.10 2024-07-26 [1] CRAN (R 4.4.0)
#> yardstick * 1.3.1 2024-03-21 [1] CRAN (R 4.4.0)
#> zip 2.3.1 2024-01-27 [1] CRAN (R 4.4.0)
#> zoo 1.8-12 2023-04-13 [1] CRAN (R 4.4.0)
#>
#> [1] /Users/zad/Library/R/arm64/4.4/library
#> [2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
#>
#> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
References
Help support the website!