Fits a dual-pool logistic model representing rapidly and slowly degradable fractions.
Value
A dual_logistic_fit object containing:
Parameter estimates
Model diagnostics
Predicted values
Residuals
Rapid and slow pool estimates
Details
Equation
$$ V(t)= \frac{V1F} { 1+\exp\left[2-4k1(t-\lambda)\right] } + \frac{V2F} { 1+\exp\left[2-4k2(t-\lambda)\right] } $$
where:
\(V(t)\) is cumulative gas production at time \(t\)
\(V1F\) is the final gas volume from the rapidly fermentable fraction
\(V2F\) is the final gas volume from the slowly fermentable fraction
\(k1\) is the fractional rate constant of the rapid fraction
\(k2\) is the fractional rate constant of the slow fraction
\(\lambda\) is lag time
Interpretation
The Dual Logistic model assumes that gas production originates from two independent fermentation pools:
A rapidly degradable fraction (\(V1F\))
A slowly degradable fraction (\(V2F\))
Each fraction follows a logistic fermentation pattern with its own rate constant.
Examples
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_dual_logistic(
gp
)
#> Warning: Large negative pressure values detected. Minimum PSI = -1.274 . Please inspect the affected bottles.
#> rumenGP data validation passed.
#> Observations: 1752
#> Heads: 24
#> Treatments: 5
summary(fit_default)
#>
#> Dual-pool Logistic model summary
#> --------------------------------
#> Total bottles: 24
#> Successful fits: 20
#> Failed fits: 4
#> Low R-squared (< 0.90): 0
#> Lambda at boundary: 1
#>
# Fit using custom starting values
fit_custom_start <- fit_dual_logistic(
gp,
start = list(
V1F = 30,
V2F = 70,
k1 = 0.20,
k2 = 0.05,
lambda = 0.50
)
)
#> Warning: Large negative pressure values detected. Minimum PSI = -1.274 . Please inspect the affected bottles.
#> rumenGP data validation passed.
#> Observations: 1752
#> Heads: 24
#> Treatments: 5
summary(fit_custom_start)
#>
#> Dual-pool Logistic model summary
#> --------------------------------
#> Total bottles: 24
#> Successful fits: 20
#> Failed fits: 4
#> Low R-squared (< 0.90): 0
#> Lambda at boundary: 1
#>