Report and reproduce
Question. Could another researcher identify the exact data, model, diagnostics, and limits behind a covariance claim?
Reproducibility begins with an auditable statement of what was analysed. A rendered figure alone is not enough, and neither is a script without the row-selection and environment record that gives it meaning.
Worked example: report a ten-score dog result
We used ten standardised behaviour scores from 100 dogs with nine annual records each. The Gaussian model had a separate intercept and linear study-year trend for each score, with three shared axes and trait-specific variance at each level.
Dog-directed fear and touch sensitivity were positively associated both between dogs (0.501, 95% interval 0.327 to 0.642) and within dogs across years (0.174, 0.114 to 0.239). The direct between-minus-within contrast was 0.327 (0.139 to 0.491). For that interval, we subtracted the two correlations within each selected glmmTMB refit and took percentiles across 1,095 eligible pairs of 1,200 attempted. See the dog contrast table and bootstrap record.
Minimum reporting table
| Item | Record |
|---|---|
| Biological target | Which level and trait association is being interpreted? |
| Data and preparation | Source, periods retained, observed response counts, response-mask hash, trait order, transformations, missingness and censoring rules. |
| Mean design | Fixed effects, contrasts, offsets, and interactions. |
| Covariance design | Grouping identifiers, ranks, residual and unique-variance convention. |
| Fitting and selection | Package versions, ML/REML, candidate grid, health rules, and selection rule. |
| Uncertainty | Target, method, interval level, and any unavailable interval evidence. |
| Bootstrap ledger, if used | Resampling unit, seeds, attempted and accepted refits, failed-refit reasons, and the criteria used to include or exclude refits. |
| Limits | Distributional assumptions, data-suitability boundaries, and conclusions not supported. |
Name the attempted model, the failed check, and what changed in a subsequent fit. For the ten-score example, the independent glmmTMB fit exceeded the gradient threshold. The mapped-start comparison records both outcomes. Keep both in the attempt table so readers can see how the start affected the result.
Fill-in reporting template
Replace every bracketed field; delete any sentence that does not apply.
Methods. We analysed [records] observations from [individuals] individuals, with [number/range] repeated occasions and the traits [names]. We [transformed / did not transform] each trait by [rule], then [centred/scaled or other preparation]. The fixed mean model included [trait-specific predictors and interactions]. We fitted [distribution] models by [ML/REML] in [software and version], with [covariance form and rank] at the B and W levels. The rank was [prespecified / selected by stated rule]. We treated fits as usable when [convergence, Hessian, gradient, and boundary rules] were met. We quantified uncertainty using [method and interval level]; [if none: all reported values are point estimates].
Results. The retained fit [passed / did not pass] the stated numerical checks: [give the relevant diagnostic values]. At the [B/W] level, [traits] had a fitted [covariance/correlation] of [estimate and interval, if available]. Repeatability for [trait] was [estimate and interval, if available], and the shared component represented [communality] of its fitted [B/W] variance. These estimates are conditional on [trait set, transformation, mean model, covariance rank, and selection rule]. They describe [sample and setting] and do not by themselves identify a causal process or establish performance in a wider population.
If no valid interval was calculated, write “interval not estimated” or “point estimate only.” Do not use a standard error for a different parameter, a cross-engine difference, or a clean-looking residual plot as a confidence interval for the quantity of interest.
Report the retained bootstrap record
Report the target and scale, data and fitted model, resampling rule, screening criteria, attempted and retained counts, and percentile calculation. For a new campaign, save the seed list, response mask and one row per attempted refit with its acceptance status and reason. For the published charr and dog campaigns, link the bundled derived targets and receipts. These support recalculating the intervals among the retained refits. Full campaign runners and per-attempt histories for these two campaigns are unavailable in the ZIP.
Do not silently discard non-converged draws, swap the covariance rank after seeing them, or call the result a model-free confidence interval. A bootstrap describes variation under the declared resampling and model procedure. Model checking and sensitivity analysis remain separate questions.
Claims these outputs do not support
- Do not combine B and W into one “behavioural correlation.” State the level: B describes persistent differences among sampled individuals after mean adjustment; W also contains short-term state, context, and measurement error.
- Do not use an adjusted association as evidence that one trait causes another, or that the fitted shared component is a biological mechanism.
- Do not treat residual plots as proof that the Gaussian model, missingness, censoring, or bounded-score approximation is correct. Report visible departures and consider sensitivity analyses appropriate to the measurement process.
- Do not generalise from the number of retained individuals alone. Report records, individuals, repeat structure, exclusions, and the population and setting from which the sample came.
- Do not hide selection uncertainty. A prescribed rank is a modelling condition, not a discovered number of syndrome axes; a selected trait set, transformation, covariance structure, or winning optimiser can also condition the reported estimate.
- Do not add confidence language when intervals or calibration were not computed. Numerical convergence and agreement between engines establish computational health, not inferential certainty.
Downloadable materials
The local downloads page contains standalone analysis scripts, lesson-embedded fitting code, and result tables used by the site. Paths remain relative so the rendered _site folder can be opened locally without a server.
Run the main examples from the download
Extract the reproduction ZIP. Open a terminal in the extracted folder containing tutorial/ and analysis/.
Recalculate the saved intervals
These scripts read the bundled retained draws and write percentile intervals to analysis/cache/tutorial-data/. Each prints how many draw pairs it used. These commands do not simulate datasets or rerun the original refits.
Rscript --vanilla tutorial/downloads/bootstrap/main-examples/summarise-draws.R charr
Rscript --vanilla tutorial/downloads/bootstrap/main-examples/summarise-draws.R dogsPrepare the three datasets
In R, install the packages for data preparation. readxl opens the charr workbook, and digest records the checksum of each input file.
install.packages(c("readxl", "digest"))Run the command for the dataset you want to use. Each script prints the record and measurement counts, then saves the prepared data under analysis/cache/tutorial-data/.
Rscript --vanilla tutorial/data/prepare-charr.R
Rscript --vanilla tutorial/data/prepare-dogs.R
Rscript --vanilla tutorial/data/prepare-red-knots.RFit the main models
Install glmmTMB and gllvmTMB using Install the software. Set OPENBLAS_NUM_THREADS and OMP_NUM_THREADS to 1 in your terminal before fitting.
Run one charr command for each package you want to try. The dog script runs both packages and compares their starting values.
Rscript --vanilla tutorial/downloads/charr/fit-charr.R glmmTMB
Rscript --vanilla tutorial/downloads/charr/fit-charr.R gllvmTMB
Rscript --vanilla tutorial/downloads/dogs-main-ten/fit-dogs-main-ten.RCheck the fit diagnostics before interpreting the fresh estimates. Compare the fresh glmmTMB point estimates with the saved figure tables using the command below. The archived intervals stay with their archived estimates.
Rscript --vanilla tutorial/downloads/compare-fresh-points.RRedraw the manuscript figures
In R, install ggplot2, patchwork and ggrepel for the figure redraws. The figure scripts use the saved results, so you can run this step without fitting the models.
The Figure Gallery names the input files and links each plotting script. These scripts read saved results and write the plots to tutorial/figures/figure-gallery/.
Rscript --vanilla tutorial/downloads/figure-gallery/make-figure-2.R
Rscript --vanilla tutorial/downloads/figure-gallery/make-figure-3.R
Rscript --vanilla tutorial/downloads/figure-gallery/make-figure-4.RRun the extensions
Use the six-trait red-knot instructions for that study’s fits and uncertainty. The temperature simulation and optional group comparison run together.
Rscript --vanilla analysis/extensions/random-slopes.RWhat each output is for
| Output | What it shows |
|---|---|
| Charr contrast and dog contrasts | Saved between-minus-within estimates and bootstrap limits. |
| Figure Gallery source tables | Saved correlations, communalities, repeatabilities and coordinates for redrawing Figures 2 to 4. |
Fresh diagnostics and point tables in analysis/cache/tutorial-data/ |
What the scripts fitted in the reader’s R environment, with the status of each fit. |
Provenance and access
The repository includes the input files, standalone preparation and fitting scripts, lesson-embedded fitting code, derived tables, figures, and settings used in the examples. Run the commands under Run the main examples from the download from the repository root; no separate data download is needed. The data notes identify the sources and acknowledgments. If you replace a bundled source file, record its checksum and provenance, rerun preparation and fitting, and re-check every row and modelling decision before using the saved figures or tables.
A saved-result website render uses the retained artifacts when run with --no-execute; a plain Quarto render runs enabled document chunks, including diagnostic summaries. It does not rerun the empirical model fits. To reproduce those fits, run the staged analysis scripts from the repository root in a declared R environment, then compare generated result files to the files used by the site. A package update that changes a result is a finding to report, not an automatic overwrite.
A short checklist before sharing
- Every reported number has a retained source table.
- Every figure has descriptive alternative text and a caption that identifies its level and target.
- Each empirical lesson identifies whether its preparation and fit code ran during this render.
- Failed fits and suitability boundaries are visible.
- No manuscript-only source or private project link has entered the public teaching surface.