View source: R/guess_coupled.R
make_guess_coupled | R Documentation |
The function uses some heuristics to provide initial guesses for the parameters
of the Baranyi-Ratkowsky model selected that can be used with fit_coupled_growth()
.
make_guess_coupled(fit_data, mode = "two_steps")
fit_data |
Tibble (or data.frame) of data for the fit. The shape of the data will depend on the
fitting |
mode |
the type of model fitting approach. Either |
logbase_mu |
Base for the definition of mu. By default, |
logbase_logN |
Base for the definition of logN. By default, 10 (decimal logarithm). |
A named numeric vector of initial guesses for the model parameters
## Example 1: Two-steps fitting-------------------------------------------------
data(example_coupled_twosteps)
guess <- make_guess_coupled(example_coupled_twosteps)
show_guess_coupled(example_coupled_twosteps, guess)
my_fit <- fit_coupled_growth(example_coupled_twosteps,
start = guess,
mode = "two_steps")
print(my_fit)
coef(my_fit)
summary(my_fit)
plot(my_fit)
## Example 2: One-step fitting--------------------------------------------------
data("example_coupled_onestep")
guess <- make_guess_coupled(example_coupled_onestep, mode = "one_step")
show_guess_coupled(example_coupled_onestep,
guess,
"one_step")
my_fit <- fit_coupled_growth(example_coupled_onestep,
start = guess,
mode = "one_step")
print(my_fit)
coef(my_fit)
summary(my_fit)
plot(my_fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.