Skip to contents

Predict the phenology of fish using the effective value framework.

Usage

predict_phenology(data, dates, temperature, spawn.date, model)

Arguments

data

Data frame with dates and temperature.

dates

Date of temperature measurements.

temperature

Temperature measurements.

spawn.date

Date of spawning, given as a character string (e.g., "1990-08-18")

model

A data.frame with a column named "expression" or a character vector giving model specifications. Can be obtained using model_select() or using you own data to obtain a model expression (see fit_model).

Value

A list with the following elements:

  • days_to_develop: A numeric vector of length 1; number of predicted days to hatch or emerge.

  • ef_table: An n x 4 tibble (n = number of days to hatch or emerge) with the dates, temperature, effective values, and cumulative sum of the effective values.

  • dev.period: a 1x2 dataframe with the dates corresponding to when your fish's parent spawned (input with predict_phenology(spawn.date = ...)) and the date when the fish is predicted to hatch or emerge.

  • model_specs: A data.frame with the model specifications.

References

Sparks, M.M., Falke, J.A., Quinn, T.A., Adkinson, M.D., Schindler, D.E. (2019). Influences of spawning timing, water temperature, and climatic warming on early life history phenology in western Alaska sockeye salmon. Canadian Journal of Fisheries and Aquatic Sciences, 76(1), 123–135.

Examples

library(hatchR)
# get model parameterization
sockeye_hatch_mod <- model_select(
  author = "Beacham and Murray 1990",
  species = "sockeye",
  model_id = 2,
  development_type = "hatch"
)

# predict phenology
sockeye_hatch <- predict_phenology(
  data = woody_island,
  dates = date,
  temperature = temp_c,
  spawn.date = "1990-08-18",
  model = sockeye_hatch_mod
)
#> Warning: ! Fish developed, but negative temperature values resulted in NaNs after
#>   development.
#>  Check date(s): 1991-08-12
#>  Fish spawn date was: 1990-08-18