growth.gcFitSpline
performs a smooth spline fit on the dataset and determines
the highest growth rate as the global maximum in the first derivative of the spline.
growth.gcFitSpline(
time,
data,
gcID = "undefined",
control = growth.control(biphasic = FALSE)
)
A gcFitSpline
object. The lag time is estimated as the intersection between the
tangent at the maximum slope and the horizontal line with \(y = y_0\), where
y0
is the first value of the dependent variable. Use plot.gcFitSpline
to
visualize the spline fit and derivative over time.
Raw time values provided to the function as time
.
Raw growth data provided to the function as data
.
Filtered time values used for the spline fit.
Filtered growth values used for the spline fit.
(Character) Identifies the tested sample.
Fitted time values.
Fitted growth values.
List of determined growth parameters.
A
: Maximum growth.
dY
: Difference in maximum growth and minimum growth.
mu
: Maximum growth rate (i.e., maximum in first derivative of the spline).
tD
: Doubling time.
t.max
: Time at the maximum growth rate.
lambda
: Lag time.
b.tangent
: Intersection of the tangent at the maximum growth rate with the abscissa.
mu2
: For biphasic growth: Growth rate of the second growth phase.
tD2
: Doubling time of the second growth phase.
lambda2
: For biphasic growth: Lag time determined for the second growth phase.
t.max2
: For biphasic growth: Time at the maximum growth rate of the second growth phase.
b.tangent2
: For biphasic growth: Intersection of the tangent at the maximum growth rate of the second growth phase with the abscissa.
integral
: Area under the curve of the spline fit.
smooth.spline
object generated by the smooth.spline
function.
list of time ('x') and growth ('y') values describing the first derivative of the spline fit.
(Logical) Indicates whether the performed fit is reliable (to be set manually).
(Logical) Indicates whether a spline fit was successfully performed on the data.
(Logical) Indicates whether a second growth phase was identified.
Object of class grofit.control
containing list of options passed to the function as control
.
Vector of the independent variable (usually time).
Vector of dependent variable (usually: growth values).
(Character) The name of the analyzed sample.
A grofit.control
object created with growth.control
,
defining relevant fitting options.
(Logical) Shall growth.gcFitSpline
try to extract growth
parameters for two different growth phases (as observed with, e.g., diauxic shifts)
(TRUE
) or not (FALSE
)?
If biphasic = TRUE
, the following steps are performed to define a
second growth phase:
Determine local minima within the first derivative of the smooth spline fit.
Remove the 'peak' containing the highest value of the first derivative (i.e., \(mu_{max}\)) that is flanked by two local minima.
Repeat the smooth spline fit and identification of maximum slope for later time values than the local minimum after \(mu_{max}\).
Repeat the smooth spline fit and identification of maximum slope for earlier time values than the local minimum before \(mu_{max}\).
Choose the greater of the two independently determined slopes as \(mu_{max}2\).
Matthias Kahm, Guido Hasenbrink, Hella Lichtenberg-Frate, Jost Ludwig, Maik Kschischo (2010). grofit: Fitting Biological Growth Curves with R. Journal of Statistical Software, 33(7), 1-21. DOI: 10.18637/jss.v033.i07
Other growth fitting functions:
growth.drFit()
,
growth.gcBootSpline()
,
growth.gcFitLinear()
,
growth.gcFitModel()
,
growth.gcFit()
,
growth.workflow()
# Create random growth dataset
rnd.dataset <- rdm.data(d = 35, mu = 0.8, A = 5, label = 'Test1')
# Extract time and growth data for single sample
time <- rnd.dataset$time[1,]
data <- rnd.dataset$data[1,-(1:3)] # Remove identifier columns
# Perform spline fit
TestFit <- growth.gcFitSpline(time, data, gcID = 'TestFit',
control = growth.control(fit.opt = 's'))
plot(TestFit)
Run the code above in your browser using DataLab