Parrot vocal repertoire evolution

Statistical analysis

Author
Published

August 26, 2025

Code
# print link to github repo if any
if (file.exists("./.git/config")){
  config <- readLines("./.git/config")
  url <- grep("url",  config, value = TRUE)
  url <- gsub("\\turl = |.git$", "", url)
  cat("\nSource code and data found at [", url, "](", url, ")", sep = "")
  }

Source code and data found at

Code
# options to customize chunk outputs
knitr::opts_chunk$set(
  tidy.opts = list(width.cutoff = 65), 
  tidy = TRUE,
  message = FALSE
 )

1 Custom functions

Code
brms_summary <- function(...) {
    extended_summary(..., highlight = TRUE, remove.intercepts = TRUE,
        trace.palette = viridis::mako, fill = "#54C9ADFF", gsub.pattern = "b_treatment|b_",
        gsub.replacement = "")

}

Purpose

  • Determine the factors shaping call repertoire size in parrots

 

Load packages

Code
# install sketchy package if not installed
if (!requireNamespace("sketchy", quietly = TRUE)) {
    install.packages("sketchy")
}

# knitr is require for creating html/pdf/word reports formatR is
# used for soft-wrapping code
pkgs <- c("ape", "bayesplot", "brms", "dagitty", "devtools", "dplyr",
    "fitdistrplus", "ggcorrplot", "ggdag", "ggplot2", "gridExtra",
    "Hmisc", "loo", "pdftools", "phylobase", "phylolm", "phylosignal",
    "phytools", "MCMCglmm", "nFactors", "reshape2", "rio", "tidyverse",
    github = "maRce10/brmsish", "viridis", github = "stan-dev/cmdstanr")

# install/ load packages
sketchy::load_packages(packages = pkgs)
Warning: replacing previous import 'brms::rstudent_t' by 'ggdist::rstudent_t'
when loading 'brmsish'
Warning: replacing previous import 'brms::dstudent_t' by 'ggdist::dstudent_t'
when loading 'brmsish'
Warning: replacing previous import 'brms::qstudent_t' by 'ggdist::qstudent_t'
when loading 'brmsish'
Warning: replacing previous import 'brms::pstudent_t' by 'ggdist::pstudent_t'
when loading 'brmsish'

2 Format data

Code
BStree <- read.tree("./data/raw/08112025_BrianSmith.treefile")
trait <- read.csv("./data/raw/ALLTRAITS.MCMCglmm.csv", header = T)

# Align tree and trait data
justthetip <- intersect(BStree$tip.label, trait$gs)
BStree <- drop.tip(BStree, setdiff(BStree$tip.label, justthetip))
trait <- trait[trait$gs %in% justthetip, ]

trait$flock <- trait$Log.max.flocksize

# rename and prepare table for brms
trait <- trait %>%
    rename(phylo = "gs", repertoire = "sp") %>%
    mutate_at(c("cs", "diet", "hd"), as.factor) %>%
    mutate_at(c("brain", "color", "flock", "longevity", "mass"), ~(scale(.) %>%
        as.vector))  #added flock for median scaling
trait$species <- trait$phylo

A <- ape::vcv.phylo(BStree)

3 Define DAG

Code
PCVEdag <- dagify(longevity ~ mass, repertoire ~ brain + cs + flock +
    hd + color + diet + longevity, color ~ repertoire + diet + flock +
    hd + mass + cs, cs ~ flock, brain ~ longevity + mass)

ggdag(PCVEdag) + theme_dag_blank()

4 Regression models

4.1 Brain

Code
#------------------------modeling iterations
# no phylo BRAIN brainnophylo <- brm( formula = repertoire ~
# brain + longevity + mass, data = trait, chains = 4, cores = 4)
# plot(brainnophylo) summary(brainnophylo) rm(brainnophylo) no
# phylo BRAIN student brainnophylo2 <- brm( formula = repertoire
# ~ brain + longevity + mass, data = trait, family = student(),
# chains = 4, cores = 4) plot(brainnophylo2)
# summary(brainnophylo2) pp_check(brainnophylo2, ndraw = 100)
# plot(loo(brainnophylo2)) y = as.numeric(trait$repertoire) yrep
# = posterior_predict(brainnophylo2, draws = 500)
# loo_brainnophylo = loo(brainnophylo2, save_psis = T)
# ppc_loo_pit_overlay(yrep = yrep, y = y, lw =
# weights(loo_brainnophylo$psis_object)) + yaxis_text()
# rm(brainnophylo2)

#---------------------brain
adjustmentSets(x = PCVEdag, outcome = "repertoire", exposure = "brain",
    effect = "direct")  #(color, longevity) | (longevity, mass) -> (longevity) this is updated after correlation plot

{ longevity, mass }

Code
# brain
brain_reg <- brm(formula = repertoire ~ brain + longevity + mass +
    (1 | gr(phylo, cov = A)) + (1 | species), data = trait, data2 = list(A = A),
    iter = 6000, family = poisson(link = "log"), prior = c(prior(normal(0,
        10), "b"), prior(normal(0, 50), "Intercept"), prior(student_t(3,
        0, 20), "sd")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/brain_reg.rds")

# print results
brms_summary(brain_reg)

4.2 brain_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ brain + longevity + mass + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 0 (0%) 0 7498.014 8152.458 507281327
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
brain 0.394 -0.338 1.135 1 7545.506 8677.625
longevity 0.165 -0.087 0.410 1.001 8741.012 8380.815
mass -0.299 -0.994 0.409 1 7498.014 8152.458

4.3 Color

Code
adjustmentSets(x = PCVEdag, outcome = "repertoire", exposure = "color",
    effect = "direct")  #(brain, longevity) | (mass) -> () after update no relation


color_reg <- brm(formula = repertoire ~ color + (1 | gr(phylo, cov = A)) +
    (1 | species), data = trait, data2 = list(A = A), iter = 6000,
    family = poisson(link = "log"), prior = c(prior(normal(0, 10),
        "b"), prior(normal(0, 50), "Intercept"), prior(student_t(3,
        0, 20), "sd")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/color_reg.rds")

# print results
brms_summary(color_reg)

4.4 color_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ color + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 0 (0%) 0 3497.595 5748.972 281316726
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
color -0.027 -0.305 0.291 1.001 3497.595 5748.972

4.5 CS

Code
adjustmentSets(x = PCVEdag, outcome = "repertoire", exposure = "cs",
    effect = "direct")  #no adjustments

cs_reg <- brm(formula = repertoire ~ cs + (1 | gr(phylo, cov = A)) +
    (1 | species), data = trait, data2 = list(A = A), iter = 6000,
    family = poisson(link = "log"), prior = c(prior(normal(0, 10),
        "b"), prior(normal(0, 50), "Intercept"), prior(student_t(3,
        0, 20), "sd")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/cs_reg.rds")

# print results
brms_summary(cs_reg)

4.6 cs_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ cs + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 0 (0%) 0 7578.427 8436.599 1208203268
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
cs1 -0.151 -0.687 0.378 1 7578.427 8436.599

4.7 Diet

Code
adjustmentSets(x = PCVEdag, outcome = "repertoire", exposure = "diet",
    effect = "direct")  #(flock, hd) -> () after PCVE update

diet_reg <- brm(formula = repertoire ~ diet + flock + hd + (1 | gr(phylo,
    cov = A)) + (1 | species), data = trait, data2 = list(A = A),
    iter = 6000, family = poisson(link = "log"), prior = c(prior(normal(0,
        10), "b"), prior(normal(0, 50), "Intercept"), prior(student_t(3,
        0, 20), "sd")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/diet_reg.rds")

# print results
brms_summary(diet_reg)

4.8 diet_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ diet + flock + hd + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 0 (0%) 0 6669.096 7320.289 941500483
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
diet1 0.124 -0.346 0.591 1 8144.172 7956.631
flock 0.091 -0.105 0.289 1 7687.610 8376.275
hd2 -0.257 -0.670 0.152 1 6669.096 7320.289
hd3 -0.148 -0.839 0.531 1.001 7719.408 8238.211

4.9 Flock

Code
adjustmentSets(x = PCVEdag, outcome = "repertoire", exposure = "flock",
    effect = "direct")  #(diet) -> () after PCVE Adjustments

flock_reg <- brm(formula = repertoire ~ flock + (1 | gr(phylo, cov = A)) +
    (1 | species), data = trait, data2 = list(A = A), iter = 6000,
    family = poisson(link = "log"), prior = c(prior(normal(0, 10),
        "b"), prior(normal(0, 50), "Intercept"), prior(student_t(3,
        0, 20), "sd")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/flock_reg.rds")

# print results
brms_summary(flock_reg)

4.10 flock_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ flock + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 0 (0%) 0 4507.975 7125.182 1939336726
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
flock 0.059 -0.133 0.25 1.001 4507.975 7125.182

5 HD

Code
adjustmentSets(x= PCVEdag, outcome = "repertoire", exposure = "hd", effect = "direct") #(diet) -> () after PCVE adjustment


hd_reg <- brm(
    formula = repertoire ~ hd + diet + (1|gr(phylo, cov = A)) + (1|species),
    data = trait,
    data2 = list(A = A),
    iter = 6000,
    family = poisson(link = "log"),
    prior = c(
        prior(normal(0, 10), "b"),
        prior(normal(0, 50), "Intercept"),
        prior(student_t(3, 0, 20), "sd")), 
    control = list(adapt_delta = 0.99, max_treedepth = 15),
         file = "./data/processed/hd_reg.rds"
    
)

# print results
brms_summary(hd_reg)

5.1 hd_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ hd + diet + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 3 (0.00025%) 0 6891.073 7777.737 1337805895
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
hd2 -0.212 -0.606 0.188 1 6891.073 7923.589
hd3 -0.072 -0.731 0.570 1 8165.947 7891.109
diet1 0.119 -0.347 0.598 1 7078.525 7777.737

5.2 Longevity

Code
adjustmentSets(x = PCVEdag, outcome = "repertoire", exposure = "longevity",
    effect = "direct")  #(brain, color) | (brain, mass) -> (brain) after DAG update

{ brain, mass }

Code
long_reg <- brm(formula = repertoire ~ longevity + brain + (1 | gr(phylo,
    cov = A)) + (1 | species), data = trait, data2 = list(A = A),
    iter = 6000, family = poisson(link = "log"), prior = c(prior(normal(0,
        10), "b"), prior(normal(0, 50), "Intercept"), prior(student_t(3,
        0, 20), "sd")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/long_reg.rds")

# print results
brms_summary(long_reg)

5.3 long_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ longevity + brain + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 0 (0%) 0 5908.964 7766.633 761246686
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
longevity 0.141 -0.102 0.384 1 7653.167 7766.633
brain 0.103 -0.157 0.365 1.001 5908.964 7894.479

5.4 Mass

Code
adjustmentSets(x = PCVEdag, outcome = "repertoire", exposure = "mass",
    effect = "direct")  #(brain, mass, longevity) -> (brain, longevity) after DAG update

mass_reg <- brm(formula = repertoire ~ mass + brain + longevity +
    (1 | gr(phylo, cov = A)) + (1 | species), data = trait, data2 = list(A = A),
    iter = 6000, family = poisson(link = "log"), prior = c(prior(normal(0,
        10), "b"), prior(normal(0, 50), "Intercept"), prior(student_t(3,
        0, 20), "sd")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/mass_reg.rds")

# print results
brms_summary(mass_reg)

5.5 mass_reg

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) sd-student_t(3, 0, 20) repertoire ~ mass + brain + longevity + (1 | gr(phylo, cov = A)) + (1 | species) 6000 4 1 3000 0 (0%) 0 6322.832 7561.451 124221717
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
mass -0.298 -1.008 0.400 1 6924.930 7934.820
brain 0.390 -0.343 1.140 1.001 6322.832 7561.451
longevity 0.167 -0.078 0.419 1 8715.648 8550.563

6 Phylogenetic path analysis

Based on this example code

Code
# set individual models
long_mod <- bf(longevity ~ mass + (1 | gr(phylo, cov = A)) + (1 |
    species))
rep_mod <- bf(repertoire ~ brain + cs + flock + hd + color + diet +
    longevity + (1 | gr(phylo, cov = A)) + (1 | species), family = poisson(link = "log"))
col_mod <- bf(color ~ repertoire + diet + flock + hd + mass + cs +
    (1 | gr(phylo, cov = A)) + (1 | species))
cs_mod <- bf(cs ~ flock + (1 | gr(phylo, cov = A)) + (1 | species),
    family = bernoulli())
br_mod <- bf(brain ~ longevity + mass + (1 | gr(phylo, cov = A)) +
    (1 | species))

# fit path analysis
sem_brms <- brm(long_mod + rep_mod + col_mod + cs_mod + br_mod + set_rescor(FALSE),
    data = trait, data2 = list(A = A), iter = 20000, cores = 4, chains = 4,
    backend = "cmdstanr", prior = c(prior(normal(0, 10), "b"), prior(normal(0,
        50), "Intercept")), control = list(adapt_delta = 0.99, max_treedepth = 15),
    file = "./data/processed/path_analysis.rds", file_refit = "on_change")

# print results
brms_summary(sem_brms)

6.1 sem_brms

priors formula iterations chains thinning warmup diverg_transitions rhats > 1.05 min_bulk_ESS min_tail_ESS seed
1 b-normal(0, 10) Intercept-normal(0, 50) Intercept-student_t(3, 0.1, 2.5) Intercept-student_t(3, 0.5, 2.5) Intercept-student_t(3, 0, 2.5) Intercept-student_t(3, -0.1, 2.5) Intercept-student_t(3, 2.5, 2.5) sd-student_t(3, 0, 2.5) sd-student_t(3, 0, 2.5) sd-student_t(3, 0, 2.5) sd-student_t(3, 0, 2.5) sd-student_t(3, 0, 2.5) sigma-student_t(3, 0, 2.5) sigma-student_t(3, 0, 2.5) sigma-student_t(3, 0, 2.5) list(longevity = list(formula = longevity ~ mass + (1 | gr(phylo, cov = A)) + (1 | species), pforms = list(), pfix = list(), resp = “longevity”, family = list(family = “gaussian”, link = “identity”, linkfun = function (mu) link(mu, link = slink), linkinv = function (eta) inv_link(eta, link = slink), dpars = c(“mu”, “sigma”), type = “real”, ybounds = c(-Inf, Inf), closed = c(NA, NA), ad = c(“weights”, “subset”, “se”, “cens”, “trunc”, “mi”, “index”), normalized = c(“_time_hom”, “_time_het”, “_lagsar”, “_errorsar”, “_fcor”), specials = c(“residuals”, “rescor”)), mecor = TRUE), repertoire = list(formula = repertoire ~ brain + cs + flock + hd + color + diet + longevity + (1 | gr(phylo, cov = A)) + (1 | species), pforms = list(), pfix = list(), family = list(family = “poisson”, link = “log”, linkfun = function (mu) link(mu, link = slink), linkinv = function (eta) inv_link(eta, link = slink), dpars = “mu”, type = “int”, ybounds = c(0, Inf), closed = c(TRUE, NA), ad = c(“weights”, “subset”, “cens”, “trunc”, “rate”, “index”), specials = “sbi_log”), resp = “repertoire”, mecor = TRUE), color = list(formula = color ~ repertoire + diet + flock + hd + mass + cs + (1 | gr(phylo, cov = A)) + (1 | species), pforms = list(), pfix = list(), resp = “color”, family = list(family = “gaussian”, link = “identity”, linkfun = function (mu) link(mu, link = slink), linkinv = function (eta) inv_link(eta, link = slink), dpars = c(“mu”, “sigma”), type = “real”, ybounds = c(-Inf, Inf), closed = c(NA, NA), ad = c(“weights”, “subset”, “se”, “cens”, “trunc”, “mi”, “index”), normalized = c(“_time_hom”, “_time_het”, “_lagsar”, “_errorsar”, “_fcor”), specials = c(“residuals”, “rescor”)), mecor = TRUE), cs = list(formula = cs ~ flock + (1 | gr(phylo, cov = A)) + (1 | species), pforms = list(), pfix = list(), family = list(family = “bernoulli”, link = “logit”, linkfun = function (mu) link(mu, link = slink), linkinv = function (eta) inv_link(eta, link = slink), dpars = “mu”, type = “int”, ybounds = c(0, 1), closed = c(TRUE, TRUE), ad = c(“weights”, “subset”, “index”), specials = c(“binary”, “sbi_logit”)), resp = “cs”, mecor = TRUE), brain = list(formula = brain ~ longevity + mass + (1 | gr(phylo, cov = A)) + (1 | species), pforms = list(), pfix = list(), resp = “brain”, family = list(family = “gaussian”, link = “identity”, linkfun = function (mu) link(mu, link = slink), linkinv = function (eta) inv_link(eta, link = slink), dpars = c(“mu”, “sigma”), type = “real”, ybounds = c(-Inf, Inf), closed = c(NA, NA), ad = c(“weights”, “subset”, “se”, “cens”, “trunc”, “mi”, “index”), normalized = c(“_time_hom”, “_time_het”, “_lagsar”, “_errorsar”, “_fcor”), specials = c(“residuals”, “rescor”)), mecor = TRUE)) 20000 4 1 10000 0 (0%) 24 4.293 10.731 1171876634
Estimate l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
longevity_Intercept -0.259 -0.429 -0.038 3.179 4.456 11.074
repertoire_Intercept 2.270 1.836 2.505 3.539 4.397 11.269
color_Intercept 0.129 -0.035 0.482 3.671 4.333 11.203
cs_Intercept -3.027 -8.027 -0.787 3.809 4.312 11.312
brain_Intercept -0.114 -0.287 -0.030 3.51 4.375 11.043
longevity_mass 0.692 0.594 0.845 3.004 4.528 15.249
repertoire_brain 0.155 -0.003 0.267 4.023 4.293 10.731
repertoire_cs1 -0.075 -0.236 0.135 3.132 4.543 12.864
repertoire_flock 0.061 -0.006 0.088 3.751 4.323 12.454
repertoire_hd2 -0.039 -0.158 0.100 3.031 4.511 15.052
repertoire_hd3 0.097 0.031 0.197 3.473 4.393 11.313
repertoire_color 0.020 -0.040 0.087 2.623 4.717 11.255
repertoire_diet1 0.044 -0.097 0.167 3.433 4.394 11.357
repertoire_longevity 0.141 -0.002 0.288 3.609 4.364 12.704
color_repertoire 0.000 0.000 0.000 2.127 18.560 15.229
color_diet1 0.033 -0.213 0.134 2.97 4.529 19.013
color_flock -0.151 -0.227 -0.097 3.478 4.421 11.403
color_hd2 0.080 -0.077 0.229 3.195 4.738 16.614
color_hd3 0.150 -0.387 0.559 3.309 4.431 13.184
color_mass -0.073 -0.139 0.026 3.247 4.462 12.639
color_cs1 -0.342 -0.497 -0.182 3.445 4.389 15.105
cs_flock -2.297 -4.554 -1.336 3.036 4.521 27.377
brain_longevity 0.008 -0.058 0.102 3.776 4.319 12.605
brain_mass 0.888 0.854 0.927 2.886 4.568 24.635

Takeaways

 


Session information

Click to see
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.5.0 (2025-04-11)
 os       Ubuntu 22.04.5 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/Costa_Rica
 date     2025-08-26
 pandoc   3.2 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/x86_64/ (via rmarkdown)
 quarto   1.7.31 @ /usr/local/bin/quarto

─ Packages ───────────────────────────────────────────────────────────────────
 package           * version    date (UTC) lib source
 abind               1.4-8      2024-09-12 [1] CRAN (R 4.5.0)
 ade4                1.7-23     2025-02-14 [1] CRAN (R 4.5.0)
 adegenet            2.1.11     2025-02-06 [1] CRAN (R 4.5.0)
 adephylo            1.1-17     2025-03-14 [1] CRAN (R 4.5.0)
 ape               * 5.8-1      2024-12-16 [1] CRAN (R 4.5.0)
 arrayhelpers        1.1-0      2020-02-04 [1] CRAN (R 4.5.0)
 askpass             1.2.1      2024-10-04 [3] CRAN (R 4.5.0)
 backports           1.5.0      2024-05-23 [1] CRAN (R 4.5.0)
 base64enc           0.1-3      2015-07-28 [3] CRAN (R 4.0.2)
 bayesplot         * 1.12.0     2025-04-10 [1] CRAN (R 4.5.0)
 boot                1.3-31     2024-08-28 [4] CRAN (R 4.4.2)
 bridgesampling      1.1-2      2021-04-16 [1] CRAN (R 4.5.0)
 brms              * 2.22.0     2024-09-23 [1] CRAN (R 4.5.0)
 brmsish           * 1.0.0      2025-05-22 [1] Github (maRce10/brmsish@81ab826)
 Brobdingnag         1.2-9      2022-10-19 [1] CRAN (R 4.5.0)
 cachem              1.1.0      2024-05-16 [1] CRAN (R 4.5.0)
 checkmate           2.3.2      2024-07-29 [1] CRAN (R 4.5.0)
 cli                 3.6.5      2025-04-23 [1] CRAN (R 4.5.0)
 cluster             2.1.8.1    2025-03-12 [4] CRAN (R 4.4.3)
 clusterGeneration   1.3.8      2023-08-16 [1] CRAN (R 4.5.0)
 cmdstanr          * 0.9.0      2025-08-21 [1] https://stan-dev.r-universe.dev (R 4.5.0)
 coda              * 0.19-4.1   2024-01-31 [1] CRAN (R 4.5.0)
 codetools           0.2-20     2024-03-31 [4] CRAN (R 4.5.0)
 colorspace          2.1-1      2024-07-26 [3] CRAN (R 4.5.0)
 combinat            0.0-8      2012-10-29 [1] CRAN (R 4.5.0)
 corpcor             1.6.10     2021-09-16 [1] CRAN (R 4.5.0)
 cowplot             1.1.3      2024-01-22 [1] CRAN (R 4.5.0)
 crayon              1.5.3      2024-06-20 [1] CRAN (R 4.5.0)
 cubature            2.1.4      2025-06-02 [1] CRAN (R 4.5.0)
 curl                7.0.0      2025-08-19 [1] CRAN (R 4.5.0)
 dagitty           * 0.3-4      2023-12-07 [1] CRAN (R 4.5.0)
 data.table          1.17.0     2025-02-22 [3] CRAN (R 4.5.0)
 DBI                 1.2.3      2024-06-02 [1] CRAN (R 4.5.0)
 DEoptim             2.2-8      2022-11-11 [1] CRAN (R 4.5.0)
 devtools          * 2.4.5      2022-10-11 [1] CRAN (R 4.5.0)
 digest              0.6.37     2024-08-19 [1] CRAN (R 4.5.0)
 distributional      0.5.0      2024-09-17 [1] CRAN (R 4.5.0)
 doParallel          1.0.17     2022-02-07 [1] CRAN (R 4.5.0)
 dplyr             * 1.1.4      2023-11-17 [1] CRAN (R 4.5.0)
 ellipsis            0.3.2      2021-04-29 [3] CRAN (R 4.1.1)
 emmeans             1.11.1     2025-05-04 [3] CRAN (R 4.5.0)
 estimability        1.5.1      2024-05-12 [3] CRAN (R 4.5.0)
 evaluate            1.0.4      2025-06-18 [1] CRAN (R 4.5.0)
 expm                1.0-0      2024-08-19 [3] CRAN (R 4.5.0)
 farver              2.1.2      2024-05-13 [1] CRAN (R 4.5.0)
 fastmap             1.2.0      2024-05-15 [1] CRAN (R 4.5.0)
 fastmatch           1.1-6      2024-12-23 [3] CRAN (R 4.5.0)
 fitdistrplus      * 1.2-4      2025-07-03 [1] CRAN (R 4.5.0)
 forcats           * 1.0.0      2023-01-29 [1] CRAN (R 4.5.0)
 foreach             1.5.2      2022-02-02 [3] CRAN (R 4.1.2)
 foreign             0.8-90     2025-03-31 [4] CRAN (R 4.4.3)
 formatR             1.14       2023-01-17 [1] CRAN (R 4.5.0)
 Formula             1.2-5      2023-02-24 [3] CRAN (R 4.5.0)
 fs                  1.6.6      2025-04-12 [1] CRAN (R 4.5.0)
 future              1.49.0     2025-05-09 [1] CRAN (R 4.5.0)
 future.apply        1.11.3     2024-10-27 [1] CRAN (R 4.5.0)
 generics            0.1.4      2025-05-09 [1] CRAN (R 4.5.0)
 ggcorrplot        * 0.1.4.1    2023-09-05 [1] CRAN (R 4.5.0)
 ggdag             * 0.2.13     2024-07-22 [1] CRAN (R 4.5.0)
 ggdist              3.3.3      2025-04-23 [1] CRAN (R 4.5.0)
 ggforce             0.3.3      2021-03-05 [3] CRAN (R 4.1.1)
 ggplot2           * 3.5.2      2025-04-09 [1] CRAN (R 4.5.0)
 ggraph              2.0.5      2021-02-23 [3] CRAN (R 4.1.1)
 ggrepel             0.9.6      2024-09-07 [1] CRAN (R 4.5.0)
 globals             0.18.0     2025-05-08 [1] CRAN (R 4.5.0)
 glue                1.8.0      2024-09-30 [1] CRAN (R 4.5.0)
 graphlayouts        0.8.0      2022-01-03 [3] CRAN (R 4.1.2)
 gridExtra         * 2.3        2017-09-09 [1] CRAN (R 4.5.0)
 gtable              0.3.6      2024-10-25 [1] CRAN (R 4.5.0)
 Hmisc             * 5.2-3      2025-03-16 [3] CRAN (R 4.5.0)
 hms                 1.1.3      2023-03-21 [3] CRAN (R 4.5.0)
 htmlTable           2.4.3      2024-07-21 [3] CRAN (R 4.5.0)
 htmltools           0.5.8.1    2024-04-04 [1] CRAN (R 4.5.0)
 htmlwidgets         1.6.4      2023-12-06 [1] RSPM (R 4.5.0)
 httpuv              1.6.16     2025-04-16 [1] RSPM (R 4.5.0)
 httr                1.4.7      2023-08-15 [3] CRAN (R 4.5.0)
 igraph              2.1.4      2025-01-23 [1] CRAN (R 4.5.0)
 inline              0.3.21     2025-01-09 [1] CRAN (R 4.5.0)
 iterators           1.0.14     2022-02-05 [3] CRAN (R 4.1.2)
 jsonlite            2.0.0      2025-03-27 [1] CRAN (R 4.5.0)
 kableExtra          1.4.0      2024-01-24 [1] CRAN (R 4.5.0)
 knitr               1.50       2025-03-16 [1] CRAN (R 4.5.0)
 labeling            0.4.3      2023-08-29 [1] CRAN (R 4.5.0)
 later               1.4.2      2025-04-08 [1] RSPM (R 4.5.0)
 lattice             0.22-7     2025-04-02 [4] CRAN (R 4.5.0)
 lifecycle           1.0.4      2023-11-07 [1] CRAN (R 4.5.0)
 listenv             0.9.1      2024-01-29 [1] CRAN (R 4.5.0)
 loo               * 2.8.0      2024-07-03 [1] CRAN (R 4.5.0)
 lubridate         * 1.9.4      2024-12-08 [3] CRAN (R 4.5.0)
 magrittr            2.0.3      2022-03-30 [1] CRAN (R 4.5.0)
 maps              * 3.4.2.1    2024-11-10 [3] CRAN (R 4.5.0)
 MASS              * 7.3-65     2025-02-28 [4] CRAN (R 4.4.3)
 Matrix            * 1.7-3      2025-03-11 [4] CRAN (R 4.4.3)
 matrixStats         1.5.0      2025-01-07 [1] CRAN (R 4.5.0)
 MCMCglmm          * 2.36       2024-05-06 [1] CRAN (R 4.5.0)
 memoise             2.0.1      2021-11-26 [3] CRAN (R 4.1.2)
 mgcv                1.9-3      2025-04-04 [4] CRAN (R 4.5.0)
 mime                0.13       2025-03-17 [1] CRAN (R 4.5.0)
 miniUI              0.1.2      2025-04-17 [3] CRAN (R 4.5.0)
 mnormt              2.1.1      2022-09-26 [3] CRAN (R 4.5.0)
 multcomp            1.4-28     2025-01-29 [3] CRAN (R 4.5.0)
 mvtnorm             1.3-3      2025-01-10 [1] CRAN (R 4.5.0)
 nFactors          * 2.4.1.2    2025-06-19 [1] CRAN (R 4.5.0)
 nlme                3.1-168    2025-03-31 [4] CRAN (R 4.4.3)
 nnet                7.3-20     2025-01-01 [4] CRAN (R 4.4.2)
 numDeriv            2016.8-1.1 2019-06-06 [1] CRAN (R 4.5.0)
 optimParallel       1.0-2      2021-02-11 [1] CRAN (R 4.5.0)
 packrat             0.9.3      2025-06-16 [1] CRAN (R 4.5.0)
 parallelly          1.44.0     2025-05-07 [1] CRAN (R 4.5.0)
 pbapply             1.7-4      2025-07-20 [1] CRAN (R 4.5.0)
 pdftools          * 3.5.0      2025-03-03 [1] CRAN (R 4.5.0)
 permute             0.9-8      2025-06-25 [1] CRAN (R 4.5.0)
 phangorn            2.12.1     2024-09-17 [1] CRAN (R 4.5.0)
 phylobase         * 0.8.12     2024-01-30 [1] CRAN (R 4.5.0)
 phylolm           * 2.6.5      2024-09-30 [1] CRAN (R 4.5.0)
 phylosignal       * 1.3.1      2023-10-12 [1] CRAN (R 4.5.0)
 phytools          * 2.4-4      2025-01-08 [1] CRAN (R 4.5.0)
 pillar              1.11.0     2025-07-04 [1] CRAN (R 4.5.0)
 pkgbuild            1.4.8      2025-05-26 [1] CRAN (R 4.5.0)
 pkgconfig           2.0.3      2019-09-22 [1] CRAN (R 4.5.0)
 pkgload             1.4.0      2024-06-28 [1] CRAN (R 4.5.0)
 plyr                1.8.9      2023-10-02 [1] CRAN (R 4.5.0)
 polyclip            1.10-7     2024-07-23 [1] CRAN (R 4.5.0)
 posterior           1.6.1      2025-02-27 [1] CRAN (R 4.5.0)
 prettyunits         1.2.0      2023-09-24 [3] CRAN (R 4.5.0)
 processx            3.8.6      2025-02-21 [1] CRAN (R 4.5.0)
 profvis             0.4.0      2024-09-20 [1] CRAN (R 4.5.0)
 progress            1.2.3      2023-12-06 [3] CRAN (R 4.5.0)
 promises            1.3.3      2025-05-29 [1] RSPM (R 4.5.0)
 ps                  1.9.1      2025-04-12 [1] CRAN (R 4.5.0)
 purrr             * 1.0.4      2025-02-05 [1] CRAN (R 4.5.0)
 qpdf                1.4.1      2025-07-02 [1] CRAN (R 4.5.0)
 quadprog            1.5-8      2019-11-20 [3] CRAN (R 4.0.1)
 QuickJSR            1.7.0      2025-03-31 [1] CRAN (R 4.5.0)
 R6                  2.6.1      2025-02-15 [1] CRAN (R 4.5.0)
 RColorBrewer        1.1-3      2022-04-03 [1] CRAN (R 4.5.0)
 Rcpp              * 1.1.0      2025-07-02 [1] CRAN (R 4.5.0)
 RcppParallel        5.1.10     2025-01-24 [1] CRAN (R 4.5.0)
 readr             * 2.1.5      2024-01-10 [1] CRAN (R 4.5.0)
 remotes             2.5.0      2024-03-17 [1] CRAN (R 4.5.0)
 reshape2          * 1.4.4      2020-04-09 [1] CRAN (R 4.5.0)
 rio               * 1.2.3      2024-09-25 [1] CRAN (R 4.5.0)
 rlang               1.1.6      2025-04-11 [1] CRAN (R 4.5.0)
 rmarkdown           2.29       2024-11-04 [1] CRAN (R 4.5.0)
 rncl                0.8.7      2023-01-08 [1] CRAN (R 4.5.0)
 RNeXML              2.4.11     2023-02-01 [1] CRAN (R 4.5.0)
 rpart               4.1.24     2025-01-07 [4] CRAN (R 4.4.2)
 rstan               2.32.7     2025-03-10 [1] CRAN (R 4.5.0)
 rstantools          2.4.0      2024-01-31 [1] CRAN (R 4.5.0)
 rstudioapi          0.17.1     2024-10-22 [1] CRAN (R 4.5.0)
 sandwich            3.1-1      2024-09-15 [3] CRAN (R 4.5.0)
 scales              1.4.0      2025-04-24 [1] CRAN (R 4.5.0)
 scatterplot3d       0.3-44     2023-05-05 [1] CRAN (R 4.5.0)
 seqinr              4.2-36     2023-12-08 [1] CRAN (R 4.5.0)
 sessioninfo         1.2.3      2025-02-05 [3] CRAN (R 4.5.0)
 shiny               1.10.0     2024-12-14 [1] CRAN (R 4.5.0)
 sketchy             1.0.5      2025-08-20 [1] CRANs (R 4.5.0)
 StanHeaders         2.32.10    2024-07-15 [1] CRAN (R 4.5.0)
 stringi             1.8.7      2025-03-27 [1] CRAN (R 4.5.0)
 stringr           * 1.5.1      2023-11-14 [1] CRAN (R 4.5.0)
 survival          * 3.8-3      2024-12-17 [4] CRAN (R 4.4.2)
 svglite             2.1.3      2023-12-08 [3] CRAN (R 4.5.0)
 svUnit              1.0.6      2021-04-19 [1] CRAN (R 4.5.0)
 systemfonts         1.2.3      2025-04-30 [3] CRAN (R 4.5.0)
 tensorA             0.36.2.1   2023-12-13 [1] CRAN (R 4.5.0)
 TH.data             1.1-3      2025-01-17 [3] CRAN (R 4.5.0)
 tibble            * 3.3.0      2025-06-08 [1] RSPM (R 4.5.0)
 tidybayes           3.0.7      2024-09-15 [1] CRAN (R 4.5.0)
 tidygraph           1.2.0      2020-05-12 [3] CRAN (R 4.0.1)
 tidyr             * 1.3.1      2024-01-24 [1] CRAN (R 4.5.0)
 tidyselect          1.2.1      2024-03-11 [1] CRAN (R 4.5.0)
 tidyverse         * 2.0.0      2023-02-22 [1] RSPM (R 4.5.0)
 timechange          0.3.0      2024-01-18 [3] CRAN (R 4.5.0)
 tweenr              2.0.3      2024-02-26 [3] CRAN (R 4.5.0)
 tzdb                0.5.0      2025-03-15 [1] CRAN (R 4.5.0)
 urlchecker          1.0.1      2021-11-30 [1] CRAN (R 4.5.0)
 usethis           * 3.1.0      2024-11-26 [3] CRAN (R 4.5.0)
 uuid                1.2-1      2024-07-29 [1] CRAN (R 4.5.0)
 V8                  6.0.4      2025-06-04 [1] RSPM (R 4.5.0)
 vctrs               0.6.5      2023-12-01 [1] CRAN (R 4.5.0)
 vegan               2.7-1      2025-06-05 [1] CRAN (R 4.5.0)
 viridis           * 0.6.5      2024-01-29 [1] CRAN (R 4.5.0)
 viridisLite       * 0.4.2      2023-05-02 [1] CRAN (R 4.5.0)
 withr               3.0.2      2024-10-28 [1] CRAN (R 4.5.0)
 xaringanExtra       0.8.0      2024-05-19 [1] CRAN (R 4.5.0)
 xfun                0.53       2025-08-19 [1] CRAN (R 4.5.0)
 XML                 3.99-0.18  2025-01-01 [3] CRAN (R 4.5.0)
 xml2                1.3.8      2025-03-14 [1] CRAN (R 4.5.0)
 xtable              1.8-4      2019-04-21 [3] CRAN (R 4.0.1)
 yaml                2.3.10     2024-07-26 [1] CRAN (R 4.5.0)
 zoo                 1.8-14     2025-04-10 [3] CRAN (R 4.5.0)

 [1] /home/m/R/x86_64-pc-linux-gnu-library/4.5
 [2] /usr/local/lib/R/site-library
 [3] /usr/lib/R/site-library
 [4] /usr/lib/R/library
 * ── Packages attached to the search path.

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