fit_dynamic_growth() estimates selected parameters of a dynamic Huang-type
growth model by repeatedly solving the dynamic model and minimizing the
residual sum of squares against observed data.
Arguments
- data
Data frame with observed microbial counts.
- profile
A
dynamic_profile()object or compatible data frame.- time, response
Column names in
datacontaining observation time and microbial response.- start
Named list of starting parameter values passed to
predict_dynamic_growth(). Numeric scalar entries are candidates for estimation.- estimate
Character vector of parameter names to estimate. If
NULL, all numeric scalar entries instartexcept those listed infixedare estimated.- fixed
Optional named list of parameters to keep fixed during fitting.
- lower, upper
Optional named numeric vectors or lists with lower and upper bounds for estimated parameters.
- model, secondary, scale, dt, method, temperature
Arguments passed to
predict_dynamic_growth().- optimizer
Optimization method passed to
stats::optim().- control
Optional control list passed to
stats::optim().- ...
Additional arguments passed to
predict_dynamic_growth().
Examples
profile <- dynamic_profile(time = c(0, 10), temperature = c(20, 20))
obs <- data.frame(time = c(0, 5, 10), logN = c(2, 3.3, 5.1))
fit <- fit_dynamic_growth(
obs,
profile = profile,
time = "time",
response = "logN",
start = list(logN0 = 2, logNmax = 8, MUmax = 0.4, lag = 0),
estimate = "MUmax",
secondary = "constant",
dt = 0.25
)
coef(fit)
#> logN0 logNmax MUmax lag
#> 2.0000000 8.0000000 0.7058101 0.0000000
