make_guess_secondary {biogrowth} R Documentation

## Initial guesses for the parameters of a secondary model

### Description

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().

### Usage

make_guess_secondary(fit_data, sec_model_names)


### Arguments

 fit_data 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. sec_model_names Named character vector defining the secondary model for each environmental factor.

### Examples


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



[Package biogrowth version 1.0.1 Index]