fit_isothermal_inactivation {bioinactivation}R Documentation

Fit of Isothermal Experiments

Description

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

Usage

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

## 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 --------


[Package bioinactivation version 1.2.3 Index]