View source: R/backup/lhPar.R View source: R/FLife-lhPar.R
lhPar | R Documentation |
Uses life history theory to derive parameters for biological relationships, i.e. or growth, maturity, natural mortality. Selectivity by default is set so age at peak selectivity is the same as age at 50% mature (a50) As a minimum all 'lhPar' requires is 'linf' the asymptotic length of the von Bertalannfy growth equation.
Uses life history theory to derive parameters for biological relationships, i.e. or growth, maturity, natural mortality. Selectivity by default is set so age at peak selectivity is the same as age at 50% mature (a50) As a minimum all 'lhPar' requires is 'linf' the asymptotic length of the von Bertalannfy growth equation.
lhPar(
...,
m = list(model = "gislason", params = c(m1 = 0.55, m2 = -1.61, m3 = 1.44)),
k = function(params, a = 3.15, b = -0.64) a * params["linf"]^b,
t0 = function(params, a = -0.3922, b = -0.2752, c = -1.038) -exp(a - b *
log(params$linf) %-% (c * log(params$k))),
l50 = function(params, a = 0.72, b = 0.93) a * params["linf"]^b
)
lhStk(
...,
k = function(params, a = 3.15, b = -0.64) a * params["linf"]^b,
t0 = function(params, a = -0.3922, b = -0.2752, c = -1.038) -exp(a - b *
log(params$linf) %-% (c * log(params$k))),
l50 = function(params, a = 0.72, b = 0.93) a * params["linf"]^b,
gowth = vonB,
mat = logistic,
sel = dnormal,
sr = "bevholt",
m = list(model = "gislason", params = c(m1 = 0.55, m2 = -1.61, m3 = 1.44)),
fmult = function(x) refpts(x)["msy", "harvest"] %*% FLQuant(seq(0, 2, length.out =
100)),
range = c(min = 0, max = 40, minfbar = 1, maxfbar = 40, plusgroup = 40),
spwn = 0,
fish = 0.5,
midyear = 0.5
)
t0 |
of von Bertalanffy. This is a default that isnt normally derived from life history theory, as are the following args. |
sr |
obsolete now replaced by sel3 |
params |
|
a |
coefficient of length weight relationship |
b |
exponent of length weight relationship |
ato95 |
age at which 95% of fish are mature, offset to age at which 50% are mature |
s |
steepness of stock recruitment relationship |
v |
virgin biomass |
sel1 |
selectivity-at-age parameter for double normal, age at maximum selectivity by default set to same as age at 100% mature |
sel2 |
selectivity-at-age parameter for double normal, standard deviation of lefthand limb of double normal, by default 5 |
sel3 |
selectivity-at-age parameter for double normal, standard deviation of righthand limb of double normal, by default 5000 |
sl |
obsolete now replaced by sel2 |
m1 |
m-at-age parameter by default for Gislason empirical relationship |
m2 |
m-at-age parameter, by default for Gislason empirical relationship |
m3 |
m-at-age parameter, by default for Gislason empirical relationship |
object of class FLPar
with missing parameters calculated from life history theory
object of class FLPar
with missing parameters calculated from life history theory
loptAge
, lhRef
, lhPar
, lhEql
loptAge
, lhRef
, lhPar
, lhEql
## Not run:
#COMPARE with output of FLife::lhPar
x <- as(lhpar(linf=100), 'list')
x <- x[sort(names(x))]
y <- as(lhPar(FLPar(linf=100)), 'list')
y <- y[sort(names(y))]
all.equal(x,y)
for(i in seq(length(x)))
cat(names(x[i]), ":", unlist(x[i]), "-", names(y[i]), ":", unlist(y[i]), "\n")
# CALL with iters
lhpar(FLPar(linf=100), v=rnorm(100, 300, 200))
lhPar(FLPar(linf=rnorm(100, 80, 10)))
lhPar(FLPar(linf=100, v=rnorm(100, 300, 200)))
lhPar(FLPar(linf=100), FLPar(v=rnorm(100, 300, 200)))
lhPar(FLPar(linf=100, v=rnorm(100, 300, 200)), t0=-1, data.frame(a=1,b=7))
attributes(lhpar(FLPar(linf=100), v=rnorm(100, 300, 200)))$mmodel
## End(Not run)
## Not run:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.