View source: R/fit_mitscherlich.R
| fit_mitscherlich | R Documentation |
Fits the Mitscherlich gas-production model to each bottle in a rumen_gp dataset.
fit_mitscherlich(data, start = NULL)
data |
A rumen_gp object. |
start |
Optional list of starting values. May contain any of:
|
V(t)
=
A
\left[
1
-
\exp
\left(
-k(t-\lambda)
-
d
\left(
\sqrt{t+0.001}
-
\sqrt{\lambda+0.001}
\right)
\right)
\right]
where:
V(t) is cumulative gas production at time t
A is asymptotic gas production
k is the fractional rate constant
d is a diffusion or shape parameter
\lambda is lag time
The Mitscherlich model combines an exponential fermentation component with a diffusion-like term.
The parameter k describes the primary
fermentation rate, while d provides
additional flexibility for representing changes
in fermentation dynamics over time.
Explicit lag parameter
Flexible curve shape
Can describe complex fermentation dynamics
Often performs well when simple exponential models are inadequate
More complex than EXP0 or EXPL
Increased parameter correlation
Diffusion parameter may be less intuitive biologically
May require careful starting values
A mitscherlich_fit object containing:
Parameter estimates
Model diagnostics
Predicted values
Residuals
files <- example_data()
raw_data <- read_ankom(
files$ankom
)
metadata <- read_metadata(
files$metadata
)
gp <- process_ankom(
raw_data,
metadata,
headspace_ml = 210,
temperature_c = 39
)
# Fit using package default starting values
fit_default <- fit_mitscherlich(
gp
)
summary(fit_default)
# Fit using custom starting values
fit_custom_start <- fit_mitscherlich(
gp,
start = list(
A = 120,
k = 0.05,
d = 0.05,
lambda = 0.50
)
)
summary(fit_custom_start)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.