Predict the spawning of fish using the backwards calculation of the effective value framework.
Arguments
- data
Data frame with dates and temperature.
- dates
Date of temperature measurements.
- temperature
Temperature measurements.
- develop.date
Date of development (e.g., hatch or emergence), given as a character string (e.g., "1990-08-18"). Must be year-month-day in format shown.
- 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 (seefit_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. Presented in descending order from devlop.date backward.dev_period
: a 1x2 dataframe with the dates corresponding to when your fish's parent spawned (input withpredict_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 emergence mod for bull trout
bull_trout_emerge_mod <- model_select(author = "Austin et al. 2019",
species = "bull trout",
model = "MM",
development_type = "emerge"
)
# predict spawn date using emergence date
predict_spawn(data = crooked_river,
dates = date,
temperature = temp_c,
develop.date = "2015-03-21",
model = bull_trout_emerge_mod
)
#> $days_to_develop
#> [1] 188
#>
#> $dev_period
#> start stop
#> 1 2014-09-15 2015-03-21
#>
#> $ef_table
#> # A tibble: 188 × 5
#> index dates temperature ef_vals ef_cumsum
#> <dbl> <dttm> <dbl> <dbl> <dbl>
#> 1 1572 2015-03-21 00:00:00 2.25 0.00496 0.995
#> 2 1571 2015-03-20 00:00:00 1.97 0.00479 0.990
#> 3 1570 2015-03-19 00:00:00 1.78 0.00467 0.986
#> 4 1569 2015-03-18 00:00:00 2 0.00481 0.981
#> 5 1568 2015-03-17 00:00:00 2.02 0.00482 0.976
#> 6 1567 2015-03-16 00:00:00 2.06 0.00484 0.971
#> 7 1566 2015-03-15 00:00:00 1.97 0.00479 0.966
#> 8 1565 2015-03-14 00:00:00 1.93 0.00476 0.962
#> 9 1564 2015-03-13 00:00:00 1.64 0.00459 0.957
#> 10 1563 2015-03-12 00:00:00 1.79 0.00468 0.952
#> # ℹ 178 more rows
#>
#> $model_specs
#> # A tibble: 1 × 5
#> author species model_id development_type expression
#> <chr> <chr> <chr> <chr> <chr>
#> 1 Austin et al. 2019 bull trout MM emerge 1/exp(5.590 - (x * 0…
#>