## Examples under constant environmental conditions -------------------------
## We need some data
my_data <- data.frame(time = 0:9,
logN = c(2, 2.1, 1.8, 2.5, 3.1, 3.4, 4, 4.5, 4.8, 4.7)
)
## We can directly plot the comparison for some values
check_growth_guess(my_data, list(primary = "modGompertz"),
c(logN0 = 1.5, mu = .8, lambda = 4, C = 3)
)
## Ot it can be combined with the automatic initial guess
check_growth_guess(my_data, list(primary = "modGompertz"),
make_guess_primary(my_data, "modGompertz")
)
## Examples under dynamic environmental conditions --------------------------
## We will use the datasets included in the package
data("example_dynamic_growth")
data("example_env_conditions")
## Model equations are assigned as in fit_growth
sec_models <- list(temperature = "CPM", aw = "CPM")
## Guesses of model parameters are also defined as in fit_growth
guess <- list(Nmax = 1e4,
N0 = 1e0, Q0 = 1e-3,
mu_opt = 4,
temperature_n = 1,
aw_xmax = 1, aw_xmin = .9, aw_n = 1,
temperature_xmin = 25, temperature_xopt = 35,
temperature_xmax = 40, aw_xopt = .95
)
## We can now check our initial guess
check_growth_guess(example_dynamic_growth, sec_models, guess,
"dynamic",
example_env_conditions)
Run the code above in your browser using DataLab