Last chance! 50% off unlimited learning
Sale ends in
Uses some heuristic rules to generate an initial guess of the model parameters
of secondary growth models that can be used for model fitting with
fit_secondary_growth()
.
make_guess_secondary(fit_data, sec_model_names)
Tibble with the data used for the fit. It must have
one column with the observed growth rate (named mu
by default; can be
changed using the "formula" argument) and as many columns
as needed with the environmental factors.
Named character vector defining the secondary model for each environmental factor.
## We can use the example dataset included in the package
data("example_cardinal")
## We assign model equations to factors as usual
sec_model_names <- c(temperature = "Zwietering", pH = "fullRatkowsky")
## We can then calculate the initial guesses
make_guess_secondary(example_cardinal, sec_model_names)
## We can pass these parameters directly to fit_secondary_growth
fit_secondary_growth(example_cardinal,
make_guess_secondary(example_cardinal, sec_model_names),
c(),
sec_model_names)
Run the code above in your browser using DataLab