Exploring the options for quantifying uncertainty in derivatives of splines
Generalized additive mixed models (GAMMs) are a powerful tool for flexibly fitting time series data with both fixed and random effects. WE can use semiparametric GAMMs to make inference about bacterial growth curves that may not play well with fully parametric growth equations. Here, we fit GAMMs to growth trends of a probiotic bacterium found in fermented foods (Lactiplantibacillus pentosus) on cucumber juice medium. These data were collected to address a debate about whether estimates of bacterial growth parameters measured from optical density on microtiter plates are dependent on initial cell density. The growth parameters estimated include maximum relative growth rate, maximum biomass, and lag time, which require us to estimate the first derivatives of the GAMM splines and to quantify their uncertainty. We present a fully Bayesian approach and a hybrid frequentist-Bayesian approach in which the model is fit using maximum likelihood and posterior draws are simulated using a multivariate normal approximation. The hybrid frequentist approach produces a simultaneous 95% confidence interval across the domain of the spline and its first derivative. We make inferences about how the growth parameters vary with initial cell density and medium type. Both approaches produce similar results: as initial cell density decreases, estimated maximum growth rate increases, maximum biomass decreases, and lag time either increases or stays constant, depending on medium type. However, the hybrid frequentist approach is computationally much faster. Ultimately, we plan to incorporate it into software that will be used by fermentation scientists.