flBootSpline {QurvE} | R Documentation |
flBootSpline: Function to generate a bootstrap
Description
fl.gcBootSpline
resamples the fluorescence-'x' value pairs in a dataset with replacement and performs a spline fit for each bootstrap sample.
Usage
flBootSpline(
time = NULL,
growth = NULL,
fl_data,
ID = "undefined",
control = fl.control()
)
Arguments
time |
Vector of the independent variable: time (if |
growth |
Vector of the independent variable: growth (if |
fl_data |
Vector of dependent variable: fluorescence. |
ID |
(Character) The name of the analyzed sample. |
control |
A |
Value
A gcBootSpline
object containing a distribution of fluorescence parameters and
a flFitSpline
object for each bootstrap sample. Use plot.gcBootSpline
to visualize all bootstrapping splines as well as the distribution of
physiological parameters.
raw.x |
Raw time values provided to the function as |
raw.fl |
Raw growth data provided to the function as |
ID |
(Character) Identifies the tested sample. |
boot.x |
Table of time values per column, resulting from each spline fit of the bootstrap. |
boot.fl |
Table of growth values per column, resulting from each spline fit of the bootstrap. |
boot.flSpline |
List of |
lambda |
Vector of estimated lambda (lag time) values from each bootstrap entry. |
max_slope |
Vector of estimated max_slope (maximum slope) values from each bootstrap entry. |
A |
Vector of estimated A (maximum fluorescence) values from each bootstrap entry. |
integral |
Vector of estimated integral values from each bootstrap entry. |
bootFlag |
(Logical) Indicates the success of the bootstrapping operation. |
control |
Object of class |
See Also
Other fluorescence fitting functions:
flFitSpline()
,
flFit()
Examples
# load example dataset
input <- read_data(data.growth = system.file("lac_promoters_growth.txt", package = "QurvE"),
data.fl = system.file("lac_promoters_fluorescence.txt", package = "QurvE"),
csvsep = "\t",
csvsep.fl = "\t")
# Extract time and normalized fluorescence data for single sample
time <- input$time[4,]
data <- input$norm.fluorescence[4,-(1:3)] # Remove identifier columns
# Perform linear fit
TestFit <- flBootSpline(time = time,
fl_data = data,
ID = 'TestFit',
control = fl.control(fit.opt = 's', x_type = 'time',
nboot.fl = 50))
plot(TestFit, combine = TRUE, lwd = 0.5)