hmde
which stands for
hierarchical methods for
differential equations is a package
built for biologists with repeat size measurement data who want to fit a
specific set of growth functions.
hmde
is under active development, you can install the
stable, development version of hmde
from GitHub with:
We treat growth as the continuous rate of change for size, and fit size-dependent growth functions. The repeat survey data requires multiple measurements from the same individuals over time that can be connected up as
We assume that different individuals will have variation in the specifics of their growth function governed by the function parameters, but that individuals from the same population will have the same function description.
For notation we will express the true size for individual i at time tj as Yi(tj),
the growth function as f, and
a parameter of individual i as
βi. So
Equation can be expressed as where the integral adds up all the growth
over the intervening time. Each model we use will comes with its
specific growth parameters that we will describe. Some are more
biologically interpretable than others. We don’t assume that we see the
true sizes, and instead have observed size yij = Yi(tj) +
error. We have assumed normally distributed error in
hmde
,this has proven reasonably robust in simulation for a
more general size-dependent error model. For details see O’Brien, Warton, and Falster (2024).
Due to the hierarchical structure of the statistical model, we have distributions that govern the behaviour of growth parameters. If we are modelling only a single individual, we don’t worry about the underlying distribution so much. If we have multiple individuals then we have a distribution with hyper-parameters that acts as a population-level feature, so βi ∼ log 𝒩(μ, σ) for example, and we can examine the behaviour of the mean and standard deviation as population-level features.
hmde
supported growth functionsFor each growth function, we have implementation to model the growth of a single or for multiple individuals.
Broadly, the workflow for hmde
is to:
Stan
fit object.We will demonstrate this workflow using case studies that uses the
three growth functions that are supported in hmde
. You can
find these on our website or you can view these in R using:
For each case study, we will discuss why that growth function was chosen in the context of the survey process as data availability is a key factor in determining which functions can be used. We will not discuss the mathematical and statistical theory in depth, if that is of interest, check out the vignette ‘hmde for Mathematicians’ or check out the methodology paper O’Brien, Warton, and Falster (2024).