fit_ricker | R Documentation |
Fit a Ricker curve to spawner-recruit data and return the intercept (a) and slope (b). The model is fit via the RcppArmadillo package for speed..
fit_ricker(S, R)
S |
Spawners as a numeric vector. |
R |
Recruits or returns as a numeric vector. |
A named list with components a
for the intercept and
b
for the slope.
S <- seq(100, 1000, length.out = 100)
v_t <- rnorm(100, 0, 0.1)
R <- mapply(ricker_v_t, spawners = S, v_t = v_t, a = 1.9, b = 900, d = 1)
plot(S, log(R/S))
fit_ricker(S, R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.