| Title: | Methods for Modelling Life History Traits |
|---|---|
| Description: | Many studies have shown the relationships between life history traits for processes such as growth, maturity and natural mortality. Life history has been used to develop priors in stock assesments and to parameterise ecological models. Package has a variety of methods for modelling life history traits and processes. |
| Authors: | Laurence Kell <[email protected]> |
| Maintainer: | Laurence Kell <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 3.4.0 |
| Built: | 2026-06-04 07:57:55 UTC |
| Source: | https://github.com/flr/FLife |
FLQuant with agesCreates FLQuant and FLCohort with ages as entries
## S4 method for signature 'FLQuant' ages(object)## S4 method for signature 'FLQuant' ages(object)
object |
|
... |
any other arguments |
FLQuant or FLCohort depending on what the first argument was
knife gascuel sigmoid gompertz vonB dnormal logistic
## Not run: data(ple4) ages(m(ple4)) ## End(Not run)## Not run: data(ple4) ages(m(ple4)) ## End(Not run)
Double normal ogive
## S4 method for signature 'FLQuant,FLPar' dnormal(age, params, ...)## S4 method for signature 'FLQuant,FLPar' dnormal(age, params, ...)
age |
FLQuant or FLCohort |
params |
|
... |
any other arguments |
Returns an object of same class as age e.g. FLQuant
## Not run: params=FLPar(a1=4,sl=2,sr=5000) dnormal(FLQuant(1:10,dimnames=list(age=1:10)),params) ## End(Not run)## Not run: params=FLPar(a1=4,sl=2,sr=5000) dnormal(FLQuant(1:10,dimnames=list(age=1:10)),params) ## End(Not run)
Gascuel growth equation
## S4 method for signature 'FLQuant,FLPar' gascuel(age, params, ...)## S4 method for signature 'FLQuant,FLPar' gascuel(age, params, ...)
age |
FLQuant, FLPar or numeric with ages |
params |
|
... |
any other arguments |
Gascuel D., Fonteneau, A., and Capisano, C. (1992). Modelisation d'une croissance en deux stances chez #l'albacore (Thunnus albacares) de l'Atlantique Est. Aquat. Living Resour. 5: 155-172.
Returns a class of same type as age e.g. FLQuant
## Not run: gascuel(10) ## End(Not run)## Not run: gascuel(10) ## End(Not run)
gislason natural mortality relatoinship estimate M as a function of length. M=a*length^b;
## S4 method for signature 'FLQuant,numeric' gislason(length, params, a = 0.55, b = 1.44, c = -1.61, ...)## S4 method for signature 'FLQuant,numeric' gislason(length, params, a = 0.55, b = 1.44, c = -1.61, ...)
length |
mass at which M is to be predicted |
params |
|
a |
0.55 |
b |
1.44 |
c |
-1.61 |
... |
any other arguments |
## Not run: params=lhPar(FLPar(linf=111)) len=FLQuant(c( 1.90, 4.23, 7.47,11.48,16.04,20.96,26.07,31.22, 36.28,41.17,45.83,50.20,54.27,58.03,61.48,64.62), dimnames=list(age=1:16)) gislason(length,params) ## End(Not run)## Not run: params=lhPar(FLPar(linf=111)) len=FLQuant(c( 1.90, 4.23, 7.47,11.48,16.04,20.96,26.07,31.22, 36.28,41.17,45.83,50.20,54.27,58.03,61.48,64.62), dimnames=list(age=1:16)) gislason(length,params) ## End(Not run)
gompertz growth equation
## S4 method for signature 'FLQuant,FLPar' gompertz(age, params, ...)## S4 method for signature 'FLQuant,FLPar' gompertz(age, params, ...)
age |
FLQuant, FLPar or numeric with ages |
params |
|
... |
any other arguments |
Returns an object of same class as age e.g. FLQuant
## Not run: params=FLPar(linf=100,a=2,b=.4) age=FLQuant(1:10,dimnames=list(age=1:10)) gompertz(age,params) ## End(Not run)## Not run: params=FLPar(linf=100,a=2,b=.4) age=FLQuant(1:10,dimnames=list(age=1:10)) gompertz(age,params) ## End(Not run)
Lorenzen natural mortality relationship where M is a function of weight, modified to explicitly included M as a function of numbers in a cohort, i.e. density dependence
## S4 method for signature 'FLQuant,FLPar' grwdd(age, params, scale, k = 1, fn = vonB)## S4 method for signature 'FLQuant,FLPar' grwdd(age, params, scale, k = 1, fn = vonB)
age |
mass at which length is to be predicted |
params |
an |
scale |
reference |
k |
rate of change in density dependence |
fn |
function with growth model, with args age params |
... |
other arguments, such as scale, e.g. stock numbers now relative to a reference level, e.g. at virgin biomass and k steepness of relationship |
@details
The Lorenzen natural mortality relationship is a function of mass-at-age i.e. M=a*wt^b
The relationship can be explained by population density, since as fish grow they also die and so there is potentially less competition for resources between larger and older fish. Density dependence can be modelled by a logistic function, a sigmoid curve (or S shaped) curve, with equation
f(x)=L/(1+exp(-k(x-x0)))
where e is the natural logarithm base (also known as Euler's number), x0 is the x-value of the sigmoid's midpoint, L is the curve's maximum value, and k the steepness of the curve.
Combining the two functions gives
M=aL/(1+exp(-k(n-ref)))*wt^b;
## Not run: library(FLBRP) library(FLife) data(teleost) par=teleost[,"Hucho hucho"] par=lhPar(par) hutchen=lhEql(par) scale=stock.n(hutchen)[,25]%*%stock.wt(hutchen) scale=(stock.n(hutchen)%*%stock.wt(hutchen)%-%scale)%/%scale grw=grwdd(wt2len(stock.wt(hutchen),par),params=par,scale,k=.2) ggplot(as.data.frame(grw))+ geom_line(aes(age,data,col=factor(year)))+ theme(legend.position="none")+ scale_x_continuous(limits=c(0,15)) ## End(Not run)## Not run: library(FLBRP) library(FLife) data(teleost) par=teleost[,"Hucho hucho"] par=lhPar(par) hutchen=lhEql(par) scale=stock.n(hutchen)[,25]%*%stock.wt(hutchen) scale=(stock.n(hutchen)%*%stock.wt(hutchen)%-%scale)%/%scale grw=grwdd(wt2len(stock.wt(hutchen),par),params=par,scale,k=.2) ggplot(as.data.frame(grw))+ geom_line(aes(age,data,col=factor(year)))+ theme(legend.position="none")+ scale_x_continuous(limits=c(0,15)) ## End(Not run)
A method to simulate a knife edge ogive where at a given age the proportion chnages from 0 to 1
## S4 method for signature 'FLQuant,FLPar' knife(age, params, ...)## S4 method for signature 'FLQuant,FLPar' knife(age, params, ...)
age |
FLQuant, FLPar or numeric with ages |
params |
|
... |
any other arguments |
The knife ogive is an S-shaped or knife curve or knifeal functions, Verhulst hypothesizes that small populations increase geometrically, because the supply of resources exceeds demand. Then, as supply and demand balance, population growth is constant. Finally, as demand exceeds supply, population growth decreases at the same rate that it had increased. Verhulst describes this process with an equation that enables him to predict when a population will reach any given size (see Verhulst's Figure):
returns an object of same type as age e.g. FLQuant
## Not run: params=FLPar(a1=4) age=FLQuant(1:10,dimnames=list(age=1:10)) knife(age,params) ## End(Not run)## Not run: params=FLPar(a1=4) age=FLQuant(1:10,dimnames=list(age=1:10)) knife(age,params) ## End(Not run)
Converts length to weight based on $W=aL^b$
## S4 method for signature 'FLQuant,FLPar' len2wt(length, params)## S4 method for signature 'FLQuant,FLPar' len2wt(length, params)
length |
age FLQuant, FLPar or numeric |
params |
|
... |
any other arguments |
Returns a class of same type as length e.g. FLQuant
## Not run: params=FLPar(a=1,b=3) len2wt(FLQuant(10),params) ## End(Not run)## Not run: params=FLPar(a=1,b=3) len2wt(FLQuant(10),params) ## End(Not run)
Creates a Leslie Matrix from a FLBRP object that represents a population at equilibrium
## S4 method for signature 'FLBRP' leslie(object, fbar = FLQuant(0), numbers = TRUE, ...)## S4 method for signature 'FLBRP' leslie(object, fbar = FLQuant(0), numbers = TRUE, ...)
object |
|
fbar |
|
numbers |
|
... |
any other arguments |
matrix
## Not run: eql=lhEql(lhPar(FLPar(linf=100))) leslie(eql) ## End(Not run)## Not run: eql=lhEql(lhPar(FLPar(linf=100))) leslie(eql) ## End(Not run)
FLBRP from life history parametersTakes an FLPar object with life history and selectivity parameters
and generates a corresponding FLBRP object. Can use a range of functional forms.
## S4 method for signature 'FLPar' lhEql( params, growth = FLife::vonB, m = "gislason", sr = "bevholt", mat = logistic, sel = dnormal, range = c(min = 0, max = 40, minfbar = 1, maxfbar = 40, plusgroup = 40), spwn = 0, fish = 0.5, midyear = 0.5, ... )## S4 method for signature 'FLPar' lhEql( params, growth = FLife::vonB, m = "gislason", sr = "bevholt", mat = logistic, sel = dnormal, range = c(min = 0, max = 40, minfbar = 1, maxfbar = 40, plusgroup = 40), spwn = 0, fish = 0.5, midyear = 0.5, ... )
params |
an |
growth |
function that takes an |
m |
|
sr |
|
mat |
function that takes an |
sel |
function that takes an |
range |
|
spwn |
|
fish |
|
midyear |
when growth measured, default 0.5 |
... |
any other arguments |
units |
|
FLBRP object
## Not run: data(teleost) alb=teleost[,"Thunnus alalunga"] eql=lhEql(lhPar(alb)) ## End(Not run)## Not run: data(teleost) alb=teleost[,"Thunnus alalunga"] eql=lhEql(lhPar(alb)) ## End(Not run)
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 )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
## 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:## 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:
lhRef calculates a variety of reference points i.e. population growth rate at small
population sizs (r), and at B~MSY (rc), ratio of virgin biomass to B~MSY (sk), life
time reproductive output (srp0) and reproductive output at B~MSY (sprmsy)
lhRef( params, m = function(length, params) exp(0.55) * (length^-1.61) %*% (params["linf"]^1.44) %*% params["k"], sr = "bevholt", range = c(min = 0, max = 40, minfbar = 1, maxfbar = 40, plusgroup = 40), what = c("r", "rc", "msy", "lopt", "sk", "spr0", "sprmsy"), msy = "msy" )lhRef( params, m = function(length, params) exp(0.55) * (length^-1.61) %*% (params["linf"]^1.44) %*% params["k"], sr = "bevholt", range = c(min = 0, max = 40, minfbar = 1, maxfbar = 40, plusgroup = 40), what = c("r", "rc", "msy", "lopt", "sk", "spr0", "sprmsy"), msy = "msy" )
params |
|
m |
function for natural mortality |
sr |
|
range |
ages used i.e. c(min=0,max=40,minfbar=1,maxfbar=40,plusgroup=40) |
what |
quantities to calculate "r","lopt","rc","sk","spr0","sprmsy" |
msy |
|
object of class FLPar with reference points, i.e r, rc, sk, lopt,
## Not run: library(FLBRP) params=FLPar(linf=100,t0=0,k=.4) params=lhPar(params) lhRef(params) ## End(Not run)## Not run: library(FLBRP) params=FLPar(linf=100,t0=0,k=.4) params=lhPar(params) lhRef(params) ## End(Not run)
logistic function
## S4 method for signature 'FLQuant,FLPar' logistic(age, params, ...)## S4 method for signature 'FLQuant,FLPar' logistic(age, params, ...)
age |
|
params |
|
... |
other arguments |
## Not run: params=FLPar(a50=4,ato95=1,asym=1.0) age=FLQuant(1:10,dimnames=list(age=1:10)) logistic(age,params) ## End(Not run)## Not run: params=FLPar(a50=4,ato95=1,asym=1.0) age=FLQuant(1:10,dimnames=list(age=1:10)) logistic(age,params) ## End(Not run)
Lopt, the length at which a cohort achives its maximum biomass, can be used as a reference point to identify growth over- or underfishing. Since taking fish below or above this size results in potential loss of yield. The total biomass of a cohort changes through time as a result of gains due to an increase in mean size-at-age and losses due to natural mortality. Lopt can therefore be estimated from the natural mortality and weight-at-age vectors.
## S4 method for signature 'FLPar' lopt( params, m = function(length, params) exp(0.55) * (length^-1.61) %*% (params["linf"]^1.44) %*% params["k"], growth = FLife::vonB, ... )## S4 method for signature 'FLPar' lopt( params, m = function(length, params) exp(0.55) * (length^-1.61) %*% (params["linf"]^1.44) %*% params["k"], growth = FLife::vonB, ... )
params |
an |
m |
natural mortality function, by default Gislason |
growth |
length or weight-at-age function, by default von Bertalanffy |
... |
any other arguments |
Lopt is a function of growth and natural mortality-at-age and there are several
approximations such as and . If the life
history parameters and relationships are known then $L_opt$ can be found by finding the
time (t) and hence length at which the maximum biomass is achieved i.e.
where can be found from the relationship of mortality at length using the relationship
of Gislason, assuming the von Bertalanffy growth curve.
FLPar with $L_opt$ the length at which a cohort achives its maximum biomass
gislason, vonB, lhRef, lhPar, lhEql,
## Not run: params=lhPar(FLPar(linf=100,k=0.1,t0=-0.1,b=3)) lopt(params) ## End(Not run)## Not run: params=lhPar(FLPar(linf=100,k=0.1,t0=-0.1,b=3)) lopt(params) ## End(Not run)
Finds length at maximum biomass
## S4 method for signature 'FLPar' loptAge( params, m = function(length, params) params["m1"] %*% (exp(log(length) %*% params["m2"])), growth = vonB, ... )## S4 method for signature 'FLPar' loptAge( params, m = function(length, params) params["m1"] %*% (exp(log(length) %*% params["m2"])), growth = vonB, ... )
params |
FLPar |
m |
A function, i.e. gislason |
growth |
A function, i.e. vonB |
... |
any other arguments |
There are several ways to calculate , i.e.
i)
ii)
iii) by maximising the biomass of
iv) from an FLBRP object by fishing at F=0 and finding age where biomass is a maximum
FLPar with length at maximum biomass of a cohort
## Not run: params=lhPar(FLPar(linf=100)) loptAge(params) ## End(Not run)## Not run: params=lhPar(FLPar(linf=100)) loptAge(params) ## End(Not run)
Lorenzen natural mortality relationship estimate M as a function of weight. M=a*wt^b;
## S4 method for signature 'FLQuant,FLPar' lorenzen(wt, params, ...)## S4 method for signature 'FLQuant,FLPar' lorenzen(wt, params, ...)
wt |
mass at which M is to be predicted |
params |
an |
... |
any other arguments |
## Not run: mass=FLQuant(c( 1.90, 4.23, 7.47,11.48,16.04,20.96,26.07,31.22, 36.28,41.17,45.83,50.20,54.27,58.03,61.48,64.62), dimnames=list(age=1:16)) lorenzen(mass) ## End(Not run)## Not run: mass=FLQuant(c( 1.90, 4.23, 7.47,11.48,16.04,20.96,26.07,31.22, 36.28,41.17,45.83,50.20,54.27,58.03,61.48,64.62), dimnames=list(age=1:16)) lorenzen(mass) ## End(Not run)
Logistic ogive for proportion mature-at-age, modified to explicitly included maturity as a function of numbers in a cohort, i.e. density dependence
## S4 method for signature 'FLQuant,FLPar' matdd(age, params, scale, k = 1, flagAge = TRUE)## S4 method for signature 'FLQuant,FLPar' matdd(age, params, scale, k = 1, flagAge = TRUE)
age |
ages |
params |
an |
scale |
reference |
k |
rate of change in density dependence |
flagAge |
default is FALSE, i.e. density dependence is based on length ratherv than age |
... |
other arguments, such as scale, e.g. stock numbers now relative to a reference level, e.g. at virgin biomass and k steepness of relationship |
The relationship can be explained by population density, since as fish grow they also die and so there is potentially less competition for resources between larger and older fish. Density dependence can be modelled by a logistic function, a sigmoid curve (or S shaped) curve, with equation
f(x)=L/(1+exp(-k(x-x0)))
where e is the natural logarithm base (also known as Euler's number), x0 is the x-value of the sigmoid's midpoint, L is the curve's maximum value, and k the steepness of the curve.
Combining the two functions gives
O=aL/(1+exp(-k(n-ref)))*wt^b;
## Not run: library(FLBRP) library(FLife) data(teleost) par=teleost[,"Hucho hucho"] par=lhPar(par) hutchen=lhEql(par) scale=stock.n(hutchen)[,25]%*%stock.wt(hutchen) scale=(stock.n(hutchen)%*%stock.wt(hutchen)%-%scale)%/%scale mat=matdd(ages(scale),par,scale,k=.5) ggplot(as.data.frame(mat))+ geom_line(aes(age,data,col=factor(year)))+ theme(legend.position="none")+ scale_x_continuous(limits=c(0,15)) ## End(Not run)## Not run: library(FLBRP) library(FLife) data(teleost) par=teleost[,"Hucho hucho"] par=lhPar(par) hutchen=lhEql(par) scale=stock.n(hutchen)[,25]%*%stock.wt(hutchen) scale=(stock.n(hutchen)%*%stock.wt(hutchen)%-%scale)%/%scale mat=matdd(ages(scale),par,scale,k=.5) ggplot(as.data.frame(mat))+ geom_line(aes(age,data,col=factor(year)))+ theme(legend.position="none")+ scale_x_continuous(limits=c(0,15)) ## End(Not run)
Lorenzen natural mortality relationship where M is a function of weight, modified to explicitly included M as a function of numbers in a cohort, i.e. density dependence
## S4 method for signature 'FLQuant,FLPar' mdd(object, params, scale, k = 1, m = gislason)## S4 method for signature 'FLQuant,FLPar' mdd(object, params, scale, k = 1, m = gislason)
object |
mass at which M is to be predicted |
params |
an |
scale |
reference |
k |
rate of change in density dependence |
m |
function with mortality model, by default gisalson |
... |
other arguments, such as scale, e.g. stock numbers now relative to a reference level, e.g. at virgin biomass and k steepness of relationship |
@details
The Lorenzen natural mortality relationship is a function of mass-at-age i.e. M=a*wt^b
The relationship can be explained by population density, since as fish grow they also die and so there is potentially less competition for resources between larger and older fish. Density dependence can be modelled by a logistic function, a sigmoid curve (or S shaped) curve, with equation
f(x)=L/(1+exp(-k(x-x0)))
where e is the natural logarithm base (also known as Euler's number), x0 is the x-value of the sigmoid's midpoint, L is the curve's maximum value, and k the steepness of the curve.
Combining the two functions gives
M=aL/(1+exp(-k(n-ref)))*wt^b;
## Not run: library(FLBRP) library(FLife) data(teleost) par=teleost[,"Hucho hucho"] par=lhPar(par) hutchen=lhEql(par) scale=stock.n(hutchen)[,25]%*%stock.wt(hutchen) scale=(stock.n(hutchen)%*%stock.wt(hutchen)%-%scale)%/%scale m=mdd(wt2len(stock.wt(hutchen),par),params=par,scale,k=.9) ggplot(as.data.frame(m))+ geom_line(aes(age,data,col=factor(year)))+ theme(legend.position="none")+ scale_x_continuous(limits=c(0,15)) m=mdd(stock.wt(hutchen),params=FLPar(m1=3,m2=-0.288),scale,k=1.2,m=lorenzen) library(FLife) ## End(Not run)## Not run: library(FLBRP) library(FLife) data(teleost) par=teleost[,"Hucho hucho"] par=lhPar(par) hutchen=lhEql(par) scale=stock.n(hutchen)[,25]%*%stock.wt(hutchen) scale=(stock.n(hutchen)%*%stock.wt(hutchen)%-%scale)%/%scale m=mdd(wt2len(stock.wt(hutchen),par),params=par,scale,k=.9) ggplot(as.data.frame(m))+ geom_line(aes(age,data,col=factor(year)))+ theme(legend.position="none")+ scale_x_continuous(limits=c(0,15)) m=mdd(stock.wt(hutchen),params=FLPar(m1=3,m2=-0.288),scale,k=1.2,m=lorenzen) library(FLife) ## End(Not run)
Estimates population growth rate for a Leslie matrix
## S4 method for signature 'FLPar,missing' r(m, fec, ...)## S4 method for signature 'FLPar,missing' r(m, fec, ...)
m |
|
fec |
|
... |
any other arguments |
FLPar with growth rate a small population size
## Not run: library(popbio) eql=lhEql(lhPar(FLPar(linf=100))) L=leslie(eql) lambda(L[drop=TRUE]) ## End(Not run)## Not run: library(popbio) eql=lhEql(lhPar(FLPar(linf=100))) L=leslie(eql) lambda(L[drop=TRUE]) ## End(Not run)
Richards growth equation
## S4 method for signature 'FLQuant,FLPar' richards(age, params, ...)## S4 method for signature 'FLQuant,FLPar' richards(age, params, ...)
age |
FLQuant, FLPar or numeric object with values corresponding to ages |
params |
|
... |
other arguments |
Returns an object of same class as age e.g. FLQuant
## Not run: age=FLQuant(1:10,dimnames=list(age=1:10)) len=richards(age,FLPar(linf=100,k=.4,b=.1,m=2)) ## End(Not run)## Not run: age=FLQuant(1:10,dimnames=list(age=1:10)) len=richards(age,FLPar(linf=100,k=.4,b=.1,m=2)) ## End(Not run)
A noise generator for lognormal errors
## S4 method for signature 'numeric,FLQuant' rlnoise( n = n, len = len, sd = 0.3, b = 0, burn = 0, trunc = 0, what = c("year", "cohort", "age") )## S4 method for signature 'numeric,FLQuant' rlnoise( n = n, len = len, sd = 0.3, b = 0, burn = 0, trunc = 0, what = c("year", "cohort", "age") )
n |
number of iterations |
len |
an |
sd |
standard error for simulated series |
b |
autocorrelation parameter a real number in [0,1] |
burn |
gets rid of 1st values i series |
trunc |
get rid of values > abs(trunc) |
what |
returns time series for year, cohort or age" |
... |
any other parameters |
A FLQuant with autocorrelation equal to B.
Ranta and Kaitala 2001 Proc. R. Soc. vt = b * vt-1 + s * sqrt(1 - b^2) s is normally distributed random variable with mean = 0 b is the autocorrelation parameter
## Not run: flq=FLQuant(1:100) white <- rnoise(1000,flq,sd=.3,b=0) plot(white) acf(white) red <- rlnoise(1000,flq,sd=.3,b=0.7) plot(red) acf(red) data(ple4) res=rnoise(1000,log(flq),sd=.3,b=0) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) res=rlnoise(4,log(m(ple4)),burn=10,b=0.9,cohort=TRUE) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) ## End(Not run)## Not run: flq=FLQuant(1:100) white <- rnoise(1000,flq,sd=.3,b=0) plot(white) acf(white) red <- rlnoise(1000,flq,sd=.3,b=0.7) plot(red) acf(red) data(ple4) res=rnoise(1000,log(flq),sd=.3,b=0) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) res=rlnoise(4,log(m(ple4)),burn=10,b=0.9,cohort=TRUE) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) ## End(Not run)
A noise generator
## S4 method for signature 'numeric,FLQuant' rnoise( n = n, len = len, sd = 0.3, b = 0, burn = 0, trunc = 0, what = c("year", "cohort", "age") )## S4 method for signature 'numeric,FLQuant' rnoise( n = n, len = len, sd = 0.3, b = 0, burn = 0, trunc = 0, what = c("year", "cohort", "age") )
n |
number of iterations |
len |
an |
sd |
standard error for simulated series |
b |
autocorrelation parameter a real number in [0,1] |
burn |
gets rid of 1st values i series |
trunc |
get rid of values > abs(trunc) |
what |
returns time series for year, cohort or age" |
... |
any other parameters |
A FLQuant with autocorrelation equal to B.
Ranta and Kaitala 2001 Proc. R. Soc. vt = b * vt-1 + s * sqrt(1 - b^2) s is normally distributed random variable with mean = 0 b is the autocorrelation parameter
## Not run: flq=FLQuant(1:100) white <- rnoise(1000,flq,sd=.3,b=0) plot(white) acf(white) red <- rnoise(1000,flq,sd=.3,b=0.7) plot(red) acf(red) data(ple4) res=rnoise(1000,flq,sd=.3,b=0) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) res=rnoise(4,m(ple4),burn=10,b=0.9,cohort=TRUE) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) ## End(Not run)## Not run: flq=FLQuant(1:100) white <- rnoise(1000,flq,sd=.3,b=0) plot(white) acf(white) red <- rnoise(1000,flq,sd=.3,b=0.7) plot(red) acf(red) data(ple4) res=rnoise(1000,flq,sd=.3,b=0) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) res=rnoise(4,m(ple4),burn=10,b=0.9,cohort=TRUE) ggplot()+ geom_point(aes(year,age,size= data), data=subset(as.data.frame(res),data>0))+ geom_point(aes(year,age,size=-data), data=subset(as.data.frame(res),data<=0),colour="red")+ scale_size_area(max_size=4, guide="none")+ facet_wrap(~iter) ## End(Not run)
Regime shifts Evidence for regime shifts are explored using a a sequential t-test algorithm (STARS; rodionov2004sequential) as modified by Szuwalski et al., (submitted)
## S4 method for signature 'FLQuant' rod(object, ...)## S4 method for signature 'FLQuant' rod(object, ...)
object |
an object of class |
... |
any other arguments |
Returns a data.frame
## Not run: object=rlnorm(1,FLQuant(0,dimnames=list(year=1:30)),.3) pg=rod(object) ggplot(object) + geom_polygon(aes(year,data,group=regime), fill="lavender",col="blue", lwd=.25,data=pg,alpha=.75)+ geom_point(aes(year,data))+ geom_line(aes(year,data)) ## End(Not run)## Not run: object=rlnorm(1,FLQuant(0,dimnames=list(year=1:30)),.3) pg=rod(object) ggplot(object) + geom_polygon(aes(year,data,group=regime), fill="lavender",col="blue", lwd=.25,data=pg,alpha=.75)+ geom_point(aes(year,data))+ geom_line(aes(year,data)) ## End(Not run)
Methods to provide estimates of natural mortality based on growth and reproduction parameters
roff(params, ...)roff(params, ...)
params |
|
... |
any other arguments |
Natural Mortality For larger species securing sufficient food to maintain a fast growth rate may entail exposure to a higher natural mortality @gislason2008does. While many small demersal species seem to be partly protected against predation by hiding, cryptic behaviour, being flat or by possessing spines have the lowest rates of natural mortality @griffiths2007natural. Hence, at a given length individuals belonging to species with a high
may generally be exposed to a higher M than individuals belonging to species with a low
.
Functional forms
Many estimators have been propose for M, based on growth and reproduction,
Age at maturity
Growth
Growth and length at maturity
Varing by length, weight or age
returns an object of FLQuant
## Not run: params=FLPar(FLPar(linf=120,k=.15,t0=-0.1,l50=60,a=0.0001,b=3)) age=FLQuant(1:10,dimnames=list(age=1:10)) roff(params) rikhter(params) rikhter2(params) griffiths(params) djababli(params) jensen(params) jensen2(params) ## End(Not run)## Not run: params=FLPar(FLPar(linf=120,k=.15,t0=-0.1,l50=60,a=0.0001,b=3)) age=FLQuant(1:10,dimnames=list(age=1:10)) roff(params) rikhter(params) rikhter2(params) griffiths(params) djababli(params) jensen(params) jensen2(params) ## End(Not run)
sigmoid ogive
## S4 method for signature 'FLQuant,FLPar' sigmoid(age, params, ...)## S4 method for signature 'FLQuant,FLPar' sigmoid(age, params, ...)
age |
FLQuant, FLPar or numeric with ages |
params |
|
... |
any other arguments |
The sigmoid ogive is an S-shaped or sigmoid curve or sigmoidal functions, Verhulst hypothesizes that small populations increase geometrically, because the supply of resources exceeds demand. Then, as supply and demand balance, population growth is constant. Finally, as demand exceeds supply, population growth decreases at the same rate that it had increased. Verhulst describes this process with an equation that enables him to predict when a population will reach any given size (see Verhulst's Figure):
returns an object of same type as age e.g. FLQuant
## Not run: params=FLPar(a50=4,ato95=1) age=FLQuant(1:10,dimnames=list(age=1:10)) sigmoid(age,params) ## End(Not run)## Not run: params=FLPar(a50=4,ato95=1) age=FLQuant(1:10,dimnames=list(age=1:10)) sigmoid(age,params) ## End(Not run)
Calculates steepness and virgin biomass given a and b for a Beverton and Holt SRR
## S4 method for signature 'FLPar,character' sv(x, model, spr0 = NA)## S4 method for signature 'FLPar,character' sv(x, model, spr0 = NA)
x |
|
model |
|
spr0 |
spawner per recruit at F=0 |
... |
any other arguments |
FLPar with values for steepness (s) and virgin biomass (v)
## Not run: #bug params=FLPar(a=37.8,b=8.93) sv(params,"bevholt",.4) ## End(Not run)## Not run: #bug params=FLPar(a=37.8,b=8.93) sv(params,"bevholt",.4) ## End(Not run)
A dataset containing life history parameters for a range of teleost species
A data frame with 139 rows (i.e. species) and 13 variables:
asymptotic length of the Von Bertalanffy growth equation
rate at which length reaches linf
adjusts the growth equation for the initial size at birth
length at which 50% are mature
scaling factor of the length weight relationship
exponent of the length weight relationship
temperature
e.g. pelagic or demeresal
Von Bertalanffy growth equation
## S4 method for signature 'FLQuant,FLPar' vonB(age, params, ...)## S4 method for signature 'FLQuant,FLPar' vonB(age, params, ...)
age |
FLQuant, FLPar or numeric object with values corresponding to ages |
params |
|
... |
other arguments |
Returns an object of same class as age e.g. FLQuant
## Not run: params=FLPar(linf=100,t0=0,k=.4) age=FLQuant(1:10,dimnames=list(age=1:10)) len=vonB(age,params) #inverse growth curve vonB(params=params,length=len) ## End(Not run)## Not run: params=FLPar(linf=100,t0=0,k=.4) age=FLQuant(1:10,dimnames=list(age=1:10)) len=vonB(age,params) #inverse growth curve vonB(params=params,length=len) ## End(Not run)
A dataset containing life history parameters for a range of teleost species
A data frame with 15 rows (i.e. species) and 13 variables:
scaling factor of the length weight relationship
exponent of the length weight relationship
asymptotic length of the Von Bertalanffy growth equation
rate at which length reaches linf
adjusts the growth equation for the initial size at birth
asymptotic length of the Von Bertalanffy growth equation
length at which 50% are mature
age at which 50% are mature
converts weight to length
## S4 method for signature 'FLQuant,FLPar' wt2len(wt, params, ...)## S4 method for signature 'FLQuant,FLPar' wt2len(wt, params, ...)
wt |
FLQuant, FLPar or numeric with length |
params |
|
... |
any other arguments |
Returns an object of same class as wt e.g. FLQuant
## Not run: params=FLPar(a=0.1,b=3) wt2len(FLQuant(10),params) ## End(Not run)## Not run: params=FLPar(a=0.1,b=3) wt2len(FLQuant(10),params) ## End(Not run)