Calculates Mean Maximum Length (MML), the Large Fish Indicator (LFI), Typical Length (TyL) and Length Quantiles (LQ) of the whole community or a subset of the species.
get_indicators(inputs, outputs, ...)# S4 method for LeMans_param,LeMans_outputs
get_indicators(
inputs,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
prob = 0.5,
length_LFI = 40
)
# S4 method for LeMans_param,missing
get_indicators(
inputs,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
prob = 0.5,
length_LFI = 40
)
# S4 method for missing,LeMans_outputs
get_indicators(
wgt,
mid,
l_bound,
u_bound,
Linf,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
species_names = NULL,
prob = 0.5,
length_LFI = 40
)
# S4 method for missing,missing
get_indicators(
wgt,
mid,
l_bound,
u_bound,
Linf,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
species_names = NULL,
prob = 0.5,
length_LFI = 40
)
get_LFI(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
get_LFI(
inputs,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
length_LFI = 40
)
# S4 method for LeMans_param,missing
get_LFI(
inputs,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
length_LFI = 40
)
# S4 method for missing,LeMans_outputs
get_LFI(
wgt,
l_bound,
u_bound,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
species_names = NULL,
length_LFI = 40
)
# S4 method for missing,missing
get_LFI(
wgt,
l_bound,
u_bound,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
species_names = NULL,
length_LFI = 40
)
get_MML(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
get_MML(
inputs,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3]
)
# S4 method for LeMans_param,missing
get_MML(inputs, N, species = 1:dim(N)[2], time_steps = 1:dim(N)[3])
# S4 method for missing,LeMans_outputs
get_MML(
wgt,
Linf,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
species_names = NULL
)
# S4 method for missing,missing
get_MML(
wgt,
Linf,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
species_names = NULL
)
get_TyL(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
get_TyL(
inputs,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3]
)
# S4 method for LeMans_param,missing
get_TyL(inputs, N, species = 1:dim(N)[2], time_steps = 1:dim(N)[3])
# S4 method for missing,LeMans_outputs
get_TyL(
wgt,
mid,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
species_names = NULL
)
# S4 method for missing,missing
get_TyL(
wgt,
mid,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
species_names = NULL
)
get_LQ(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
get_LQ(
inputs,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
prob = 0.5
)
# S4 method for LeMans_param,missing
get_LQ(inputs, N, species = 1:dim(N)[2], time_steps = 1:dim(N)[3], prob = 0.5)
# S4 method for missing,LeMans_outputs
get_LQ(
wgt,
u_bound,
outputs,
species = 1:dim(outputs@N)[2],
time_steps = 1:dim(outputs@N)[3],
species_names = NULL,
prob = 0.5
)
# S4 method for missing,missing
get_LQ(
wgt,
u_bound,
N,
species = 1:dim(N)[2],
time_steps = 1:dim(N)[3],
species_names = NULL,
prob = 0.5
)
Additional arguments.
A numeric value or vector or a character string representing the species that you wish to use to calculate the indicators. The default is 1:dim(N)[2]
.
A numeric vector of the time steps that you wish to use to calculate the indicators. The default is 1:dim(N)[3]
.
A numeric value or vector between 0 and 1 denoting the length quantiles to be calculated. The default is 0.5
.
A numeric vector representing the thresholds to be used to calculate the LFI. The default value is 40
.
An array with dimensions nsc
, nfish
and tot_time
representing the number of individuals in each length class for each time step.
A matrix with dimensions nsc
and nfish
representing the weight of each species in each length class.
A numeric vector of length nfish
representing the mid-point of the length classes in the model.
A numeric vector of length nsc
representing the lower bounds of the length classes.
A numeric vector of length nsc
representing the upper bounds of the length classes.
A numeric vector of length nfish
representing the asymptotic length of each species.
A character vector of length nfish
that denotes the names of the species in the model.
get_indicators
returns a list object with names `LFI`, `MML`, `TYL` and `LQ`. If length(length_LFI)>1
, `LFI` is a matrix with dimensions length(time_steps)
by length(length_LFI)
where the i,j
th element represents the LFI using the j
th length_LFI
in the i
th time_steps
. If length(length_LFI)==1
, the function will return a numeric vector of length length(time_steps)
. `MML` is a numeric vector of length time_steps
where each element is the MML for the species in species
. `TYL` is a numeric vector of length time_steps
where each element is the TyL for the species in species
. If length(prob)==1
, `LQ` is a matrix with dimensions length(time_steps)
by length(prob)
where the i,j
th element is the LQ using thej
th prob
in the i
th time_steps
. If length(prob)==1
, the function will return a numeric vector of length length(time_steps)
.
If length(length_LFI)==1
, get_LFI
returns a matrix with dimensions length(time_steps)
by length(length_LFI)
where the i,j
th element is the LFI using the j
th length_LFI
in the i
th time_steps
. If length(length_LFI)==1
, the function will return a numeric vector of length length(time_steps)
.
get_MML
returns a numeric vector of length time_steps
where each element is the MML for the species in species
.
If length(prob)>1
, get_LQ
returns a matrix with dimensions length(time_steps)
and length(prob)
where the i,j
th element is the LQ using the the j
th prob
in the i
th time_steps
. If length(prob)==1
, the function will return a numeric vector of length length(time_steps)
.
The LFI represents the proportion of biomass with a length larger than length_LFI
. The MML is the biomass weighted mean of Linf
:
sum(biomass[species]*Linf[species])/sum(biomass[species])
where biomass
is a numeric vector of length nfish
representing the biomass of each species. TyL is the biomass-weighted geometric mean length of the community:
exp(sum(biomass_*log(mid))/sum(Bio_l))
where biomass_
is a numeric vector of length nsc
representing the biomass of all the species in each length class. The LQ is the length at which the biomass exceeds a given proportion prob
of the total biomass.
# NOT RUN {
# Set up and run the model
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par$Lmat, other=1e12)
effort <- matrix(0.5, 10, dim(NS_params@Qs)[3])
model_run <- run_LeMans(NS_params, years=10, effort=effort)
# Calculate the indicators
get_indicators(inputs=NS_params, outputs=model_run)
# Calculate the LFI
get_LFI(inputs=NS_params, outputs=model_run)
# Calculate MML
get_MML(inputs=NS_params, outputs=model_run)
# Calculate TyL
get_TyL(inputs=NS_params, outputs=model_run)
# Calculate LQs
get_LQ(inputs=NS_params, outputs=model_run)
# }
Run the code above in your browser using DataLab