# Obtaining the growth rate of bacteria using NonlinearModelFit

I have a data set concerning the growth of bacteria, and I need to obtain the so-called growth rate.

My data set is (OD600 vs. time(h)):

data = {{0, 0.0305}, {3, 0.14}, {6, 0.5}, {17, 4.02}, {19, 5.04}, {21, 5.52}, {24, 5.76}};


I'm thinking of two candidates, one a logistic fitting and the other a Gompertz curve.

For the logistic, one has:

nlm1 = NonlinearModelFit[data, a/(1 + E^(-b (x - c))), {a, b, c}, x]

Show[ListPlot[data], Plot[nlm1[x], {x, 0, 24}], Frame -> True]

Normal[nlm1]

***6.1918/(1 + E^(-0.30829 (-14.6587 + x)))***


And for the Gompertz function, one obtains:

nlm2 = NonlinearModelFit[data, a E^(-b (E^(-c x))), {a, b, c}, x]

Show[ListPlot[data], Plot[nlm2[x], {x, 0, 24}], Frame -> True]

Normal[nlm2]

***7.01914 E^(-6.7411 E^(-0.152831 x))***


The confusing thing is that, based on the logistic fitting, the growth rate should be $$0.308$$, but based on the Gompertz function, it should be $$0.153$$. Could this difference be due to overfitting or other mistakes that I'm making while fitting? Any help is appreciated!

• To me it seems like those are fundamental differences in the model that varant further research in which model acutally applies to your data (more datapoints would be helpful, especially for longer times). The estimated variances seem to imply however, that the sigmoid fits the data better. Commented Nov 20, 2023 at 9:32
• @Tim You have an expression E^E^(-0.152831 x) in Gombertsfunction, though the growth rates aren't comparable! Commented Nov 20, 2023 at 9:35
• @Tim Difficult to answer. Perhaps simple (f[t]-f[t0])/f[t0]? Commented Nov 20, 2023 at 10:28
• @Tim ...or the limit of the previos formulas t f'[t]/f[t]? Commented Nov 20, 2023 at 10:37
• If you believe in the AIC religion, then the logistic fit has an AICc value 4.93221 units smaller than that of the Gompertz fit: nlm2["AICc"] - nlm1["AICc"]. (Many use a threshold of a difference of 2 or more AICc units as "significant".)
– JimB
Commented Nov 20, 2023 at 17:27

Assuming growth rate (f[t]-f[t0])/f[t0] for both models, we get
Plot[{(nlm1[x] - data[[1, 2]])/data[[1, 2]], (nlm2[x] - data[[1, 2]])/data[[1, 2]]}, {x, 0, 24}]

• @Tim Yes, try Plot[{(x nlm1'[x] )/nlm1[x], (x nlm2'[x] )/nlm2[x]}, {x, 0, 24}] Commented Nov 20, 2023 at 12:25