Hierarchical Model of Species Communities
Overview
Hierarchical Modelling of Species Communities (HMSC) is a model-based approach for analyzing community ecological data. This package implements it in the Bayesian framework with Gibbs Markov chain Monte Carlo (MCMC) sampling (Tikhonov et al. (2020) doi:10.1111/2041-210X.13345).
New Features
- Added a set of utilities to facilitate Common to Rare Transfer Learning (CORAL).
- Added integration with Hmsc-HPC add-on for delegating MCMC to TensorFlow.
- Added function
computeSAIRfor shared and idiosyncratic responses to measured and latent predictors. - Failed updaters are only recorded during sampling. Failed updates can be detected in more cases (
V,Z).
Bug Fixes
- Legend for
plotVariancePartitioninghad two entries forRandomwhen there were no random levels.
Show all changes in 3.3-7Hide the rest of the changes in 3.3-7
predictcould fail when there were no random levels.
From inst/NEWS.md in the release
Install
Health
NOTEfor differences from example reference outputr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Comparing ‘Hmsc-Ex.Rout’ to ‘Hmsc-Ex.Rout.save’: 227,6626d226 < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length ...[truncated]... < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length
r-devel-windows-x86_64
Comparing 'Hmsc-Ex.Rout' to 'Hmsc-Ex.Rout.save': 227,6626d226 < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length ...[truncated]... < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 1 is not a multiple of logical subscript length < Warning in cM[sel, sel] : < length of dimension 2 is not a multiple of logical subscript length < Warning in Beta[sel, j] : < length of dimension 1 is not a multiple of logical subscript length
- NOTE8 OK, 5 NOTENow
- NOTE12 OK, 1 NOTE2026-09-13
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 42 (1 internal)includes a package overview page
- Examples that run
- 100%24 run in a plain check
- Exported functions with examples
- 68%
- Documented parameters
- 98%
- Return-value docs
- 85%
- Help pages citing references
- 0%
- Getting started with HMSC-R: high-dimensional multivariate models PDF
- Getting started with HMSC-R: low-dimensional multivariate models PDF
- Getting started with HMSC-R: spatial models PDF
- Getting started with HMSC-R: univariate models PDF
- Testing the performance of Hmsc with simulated data PDF
- |
- |
- |
- |
Downloads
Repository
- PRs merged (all time)
- 71%
- Median days to close, 50 most recently updated closed issues
- 6
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Issues over time
5 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/hmsc-r/hmsc on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Dependencies
Installing Hmsc adds 39 packages (25 with compiled code, 36 MB of source tarballs). Heaviest: ggplot2 6.0 MB, sp 4.3 MB, fields 3.9 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 3.3-7Latest2025-08-29 · current release · diff ↗ ·
added 10 exports
computeSAIR, coralCombine, coralGetRareSpeciesPriors, coralGetXDataExt, coralPlotBeta, coralPredict, coralPreprocess, coralSplitToBatches, coralTrain, importPosteriorFromHPC - RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 3.0-13
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 3.0-112021-02-24 · diff ↗
- 3.0-92020-10-29 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 3.0-62020-03-19 · diff ↗
- 3.0-42019-12-16 · diff ↗
- 3.0-22019-10-13
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-10-13
- Total releases
- 7 / 7 yrs
- License
- GPL-3 | file LICENSE OSI
- Minimum R
- ≥ 3.0.2
- Bundled data
- 294 KB / 1 file
- Download size
- 2.4 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("Hmsc")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.