fit_model | R Documentation |
stats::nls()
Generate your own custom parameterized models for predicting hatching and emergence phenology.
fit_model(temp, days, species = NULL, development_type = NULL)
temp |
Numeric vector of temperatures |
days |
Numeric vector of days to hatch or emerge |
species |
Character string of species name (e.g., "sockeye") |
development_type |
Character string of development type: "hatch" or "emerge" |
hatchR also includes functionality to generate your own custom parameterized models for predicting hatching and emergence phenology. Importantly, the custom parameterization relies on the model format developed from model 2 of Beacham and Murray (1990), which we chose because of its overall simplicity and negligible loss of accuracy. See Beacham and Murray (1990) and Sparks et al. (2019) for more specific discussion regarding model 2 and the development of the effective value approach.
List with fit model object, model coefficients, model specifications data.frame, and plot of observations and model fit.
library(hatchR)
# vector of temperatures
temperature <- c(2, 5, 8, 11, 14)
# vector of days to hatch
days_to_hatch <- c(194, 87, 54, 35, 28)
bt_hatch_mod <- fit_model(
temp = temperature,
days = days_to_hatch, species = "sockeye", development_type = "hatch"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.