powered by
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)
Spawners as a numeric vector.
Recruits or returns as a numeric vector.
A named list with components a for the intercept and b for the slope.
a
b
# NOT RUN { 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) # }
Run the code above in your browser using DataLab