View source: R/isothermal_fit.R
| fit_isothermal_inactivation | R Documentation | 
Fits the parameters of the model chosen to a set of isothermal experiments
using nonlinear regression through the function nls.
fit_isothermal_inactivation(
  model_name,
  death_data,
  starting_point,
  known_params,
  adjust_log = TRUE
)
| 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: 
 | 
| 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  | 
An instance of class IsoFitInactivation with the results.
This list has four entries:
 nls: The object of class nls with the results
of the adjustment.
parameters: a list with the values of the model parameters, both fixed and adjusted.
model: a string with the key identifying the model used.
data: the inactivation data used for the fit.
nls
## 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 --------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.