Package: hmde 1.4.0

Tess OBrien

hmde: Hierarchical Methods for Differential Equations

Wrapper for 'Stan' that offers a number of in-built models to implement a hierarchical Bayesian longitudinal model for repeat observation data. Model choice selects the differential equation that is fit to the observations. Single and multi-individual models are available. O'Brien et al. (2024) <doi:10.1111/2041-210X.14463>.

Authors:Daniel Falster [aut, ctb], Tess O'Brien [aut, cre, cph], Fonti Kar [ctb], David Warton [aut, ctb]

hmde_1.4.0.tar.gz
hmde_1.4.0.zip(r-4.7)hmde_1.4.0.zip(r-4.6)hmde_1.4.0.zip(r-4.5)
hmde_1.4.0.tgz(r-4.6-x86_64)hmde_1.4.0.tgz(r-4.6-arm64)hmde_1.4.0.tgz(r-4.5-x86_64)hmde_1.4.0.tgz(r-4.5-arm64)
hmde_1.4.0.tar.gz(r-4.7-arm64)hmde_1.4.0.tar.gz(r-4.7-x86_64)hmde_1.4.0.tar.gz(r-4.6-arm64)hmde_1.4.0.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html
card.svg |card.png
hmde/json (API)
NEWS

# Install 'hmde' in R:
install.packages('hmde', repos = c('https://traitecoevo.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/traitecoevo/hmde/issues

Pkgdown/docs site:https://traitecoevo.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

bayesian-inverse-problemsbayesian-methodsdifferential-equationshierarchical-modelsrstanstancpp

6.56 score 5 stars 12 scripts 241 downloads 43 exports 56 dependencies

Last updated from:4a8f6a7981. Checks:12 OK, 1 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK557
linux-devel-x86_64OK556
source / vignettesOK935
linux-release-arm64OK584
linux-release-x86_64OK556
macos-release-arm64OK309
macos-release-x86_64OK810
macos-oldrel-arm64OK415
macos-oldrel-x86_64OK888
windows-develOK849
windows-releaseOK779
windows-oldrelOK787
wasm-releaseFAIL163

Exports:error_estserror_ests<-fit_summaryfit_summary<-hmde_affine_dehmde_canham_dehmde_const_dehmde_data_templatehmde_estimateshmde_extract_Rhathmde_modelhmde_model_deshmde_model_nameshmde_model_parshmde_plot_de_pieceshmde_plot_obs_est_indshmde_plot_Rhat_histhmde_runhmde_vb_deindividual_estsindividual_ests<-measurement_estsmeasurement_ests<-methodmethod<-model_levelmodel_level<-model_namemodel_name<-obs_dataobs_data<-par_namespar_names<-plotpopulation_estspopulation_ests<-printprior_parsprior_pars<-runtimeruntime<-showsummary

Dependencies:abindbackportsBHcallrcheckmateclicowplotcpp11descdistributionaldplyrevaluatefarvergenericsggplot2gluegridExtragtablehighrinlineisobandknitrlabelinglifecycleloomagrittrmatrixStatsnumDerivpillarpkgbuildpkgconfigposteriorprocessxpspurrrQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsS7scalesStanHeaderstensorAtibbletidyselectutf8vctrsviridisLitewithrxfunyaml

Case study 3: Canham function growth with tree data from Barro Colorado Island

Rendered fromcanham.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2026-05-04
Started: 2024-11-28

Case study 1: Constant growth with SUSTAIN Trout data

Rendered fromconstant-growth.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2026-05-04
Started: 2024-11-28

Here be dragons

Rendered fromhere_be_dragons.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2026-05-04
Started: 2024-12-03

hmde

Rendered fromhmde.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2025-06-24
Started: 2024-11-18

hmde for Mathematicians

Rendered fromhmde_for_mathematicians.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2026-05-04
Started: 2024-12-02

Case study 2: von Bertalanffy growth with lizard size data

Rendered fromvon-bertalanffy.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2026-05-04
Started: 2024-11-28

Readme and manuals

Help Manual

Help pageTopics
The 'hmde' package.hmde-package hmde
generic error_ests gettererror_ests error_ests<-
generic fit_summary getterfit_summary fit_summary<-
Differential equation for affine growth single individual modelhmde_affine_de
Differential equation for Canham growth single and multi- individual modelshmde_canham_de
Differential equation for constant growth single and multi- individual modelshmde_const_de
Calculate Rhat statistics for a hmde_fit objecthmde_extract_Rhat
helper function for hmde_data_template that provides data structure for model, Also used to guide the user on the required structure for the model they want.hmde_model
Function to select DE given model namehmde_model_des
Returns names of available models.hmde_model_names
Show parameter list for hmde supported modelhmde_model_pars
Plot pieces of chosen differential equation model for each individual. Structured to take the individual data tibble that is built by the hmde_estimates function using the ind_par_name_mean estimates. Function piece will go from the first fitted size to the last. Accepted ggplot arguments will change the axis labels, title, line colour, alphahmde_plot_de_pieces
Plot estimated and observed values over time for a chosen number of individuals based on posterior estimates. Structured to take in the measurement_data tibble constructed by the hmde_extract_estimates function.hmde_plot_obs_est_inds
Plot histogram of R_hat values for hmde_fit object.hmde_plot_Rhat_hist
Run chosen pre-built model in Stanhmde_run
Differential equation for von Bertalanffy growth single and multi- individual modelshmde_vb_de
generic individual_ests getterindividual_ests individual_ests<-
Skink size data - Lampropholis delicataLizard_Size_Data
generic measurement_ests gettermeasurement_ests measurement_ests<-
generic method gettermethod method<-
generic model_level settermodel_level model_level<- obs_data obs_data<-
generic model_name gettermodel_name model_name<-
generic par_names getterpar_names par_names<-
generic population_ests setterpopulation_ests population_ests<-
generic prior_pars getterprior_pars prior_pars<-
generic runtime getterruntime runtime<-
Garcinia recondita - Barro Colorado Island dataTree_Size_Data
Garcinia recondita model estimates - Barro Colorado Island dataTree_Size_Ests
SUSTAIN Salmo trutta dataTrout_Size_Data