fit_isothermal_inactivation: Fit of Isothermal Experiments

Description Usage Arguments Value See Also Examples

View source: R/isothermal_fit.R

Description

Fits the parameters of the model chosen to a set of isothermal experiments using nonlinear regression through the function nls.

Usage

1
2
fit_isothermal_inactivation(model_name, death_data, starting_point,
  known_params, adjust_log = TRUE)

Arguments

model_name

character specyfing the model to adjust.

death_data

data frame with the experiment data where each row is one observation. It must have the following columns:

  • log_diff: Number of logarithmic reductions at each data point.

  • temp: Temperature of the data point.

  • time: Time of the data point.

starting_point

List with the initial values of the parameters for the adjustment.

known_params

List of the parameters of the model known.

adjust_log

logical. If TRUE, the adjustment is based on the minimization of the error of the logarithmic microbial count. If FALSE, it is based on the minimization of the error of the microbial count. TRUE by default.

Value

An instance of class IsoFitInactivation with the results. This list has four entries:

See Also

nls

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## EXAMPLE 1 -----------

data("isothermal_inactivation")  # data set used for the example.

get_isothermal_model_data()  # retrieve valid model keys.
model_name <- "Bigelow"  # Bigelow's model will be used for the adjustment.

model_data <- get_isothermal_model_data(model_name)
model_data$params  # Get the parameters of the model

## Define the input arguments

known_params = list(temp_ref = 100)
starting_point <- c(z = 10,D_R = 1)

## Call the fitting function
iso_fit <- fit_isothermal_inactivation(model_name,
                                       isothermal_inactivation, starting_point,
                                       known_params)

## Output of the results

plot(iso_fit, make_gg = TRUE)
goodness_of_fit(iso_fit)

## END EXAMPLE 1 --------

bioinactivation documentation built on Aug. 1, 2019, 5:05 p.m.