Following protocol §3.7, we retained only contrasts with total sample size \(n_1 + n_2 \geq 40\).
NoteWhat changed—and what did not
Changed: the analysis includes 5,253 of 7,237 contrasts after applying the sample-size threshold.
Unchanged: the moderator definitions, phylogenetic effect, ref_id effect, priors, and MCMC settings match the primary models.
B.2 Model specification
Models were fit on a remote server, not while rendering this book. Each model uses 4 chains × 4,000 iterations (2,000 warmup), adapt_delta = 0.97, max_treedepth = 15, and the cmdstanr backend. This chapter reads cached summary tables only.
Six moderator models are reported (m01–m05, m07). The environmental-change model (m08) is excluded because its primary fit did not converge. Convergence criteria: max \(\hat{R} \leq 1.01\), bulk and tail ESS \(\geq 400\), and no divergent transitions.
Code
sens_diagnostics_table(variant)
Convergence diagnostics (4 chains, 2000 post-warmup draws each).
Moderator
Max R̂
Min bulk ESS
Min tail ESS
Divergences
Max-treedepth hits
Trait type (m05)
1.0127
454
627
133
0
Comparison design (m02)
1.0074
550
656
0
0
Disturbance context (m01)
1.0055
599
1134
0
0
Phenotypic vs genetic study (m07)
1.0154
630
1423
0
0
Elapsed time — log₁₀ generations (m04)
1.0072
645
1217
0
0
Elapsed time — log₁₀ years (m03)
1.0053
748
1820
0
0
Warning
Models requiring convergence caution: Phenotypic vs genetic study (m07): max Rhat = 1.0154, min bulk/tail ESS = 630/1423, divergences = 0; Trait type (m05): max Rhat = 1.0127, min bulk/tail ESS = 454/627, divergences = 133. See the table above for ESS and treedepth diagnostics.
B.4 Overall comparison
The comparison label uses a fixed rule: DIFFERS means that the posterior median changed sign or that the 95% credible interval changed between including and excluding zero. Consistent means neither occurred; it does not mean the two estimates are identical. Intercepts are omitted from the overall count.
Overall: 3 of 34 moderator coefficients change their credible-interval conclusion relative to the primary fit.
B.5 Paired estimates by moderator
Each table reports raw treatment-coded coefficients for the location (mean ln M) and scale (log-SD) submodels. See the sensitivity overview for column definitions.
---title: "Sensitivity A — Minimum sample size (N ≥ 40)"---```{r setup, include=FALSE}source(here::here("Scripts", "00_packages.R"))source(here::here("Scripts", "19_sensitivity_tables.R"))variant <-"sens1_n40"sens_dat <-readRDS(here::here("Rdata", "effect_sizes", "proceed_lnm_safe.rds"))sens_total <-nrow(sens_dat)sens_n40 <-sum(sens_dat$n_total >=40, na.rm =TRUE)```## Recorded changeFollowing protocol §3.7, we retained only contrasts with total samplesize $n_1 + n_2 \geq 40$.::: {.callout-note title="What changed—and what did not"}**Changed:** the analysis includes **`r format(sens_n40, big.mark = ",")` of`r format(sens_total, big.mark = ",")` contrasts** after applying the sample-sizethreshold.**Unchanged:** the moderator definitions, phylogenetic effect, `ref_id` effect,priors, and MCMC settings match the primary models.:::## Model specificationModels were fit on a remote server, not while rendering thisbook. Each model uses 4 chains × 4,000 iterations (2,000 warmup),`adapt_delta = 0.97`, `max_treedepth = 15`, and the `cmdstanr` backend. Thischapter reads cached summary tables only.```{r how-fit, eval=FALSE}dat_n40 <- dat_es |> dplyr::filter(n_total >=40)phylo <-prepare_phylo_and_data(dat_mod, A_full)formula <-build_ls_formula(moderator, has_phylogeny = phylo$has_phylo)fit <-fit_ls_model( phylo$dat_model, formula,build_ls_priors(formula, phylo$dat_model, phylo$V, A = phylo$A_mod),V = phylo$V, A = phylo$A_mod, mcmc_args = default_mcmc_args)```## Convergence diagnosticsSix moderator models are reported (m01–m05, m07). The environmental-changemodel (m08) is excluded because its primary fit did not converge. Convergencecriteria: max $\hat{R} \leq 1.01$, bulk and tail ESS $\geq 400$, and nodivergent transitions.```{r diagnostics}sens_diagnostics_table(variant)```::: {.callout-warning}`r sens_diagnostic_flags(variant)`:::## Overall comparisonThe comparison label uses a fixed rule: **DIFFERS** means that the posteriormedian changed sign or that the 95% credible interval changed between includingand excluding zero. *Consistent* means neither occurred; it does not mean thetwo estimates are identical. Intercepts are omitted from the overall count.```{r stability-line, results='asis'}cat("**Overall:** ", sens_stability_summary(variant), "\n")```## Paired estimates by moderatorEach table reports raw treatment-coded coefficients for the location(mean `ln M`) and scale (log-SD) submodels. See the[sensitivity overview](../07_sensitivity_analyses.qmd#output-columns)for column definitions.```{r results, results='asis'}sens_all_moderator_tables(variant)```