calc_LFI {LeMaRns} | R Documentation |
Calculate community indicators
Description
Calculates the Large Fish Indicator (LFI), Typical Length (TyL) or Length Quantile (LQ) for the community or a subset of the species.
Usage
calc_LFI(wgt, N, bry, prop)
calc_LQ(wgt, u_bound, N, prob)
calc_TyL(wgt, mid, N)
Arguments
wgt |
A matrix with dimensions |
N |
A matrix with dimensions |
bry |
A numeric vector representing the length classes that are larger than |
prop |
A numeric value between 0 and 1 representing how far along, as a proportion, the value of the large indicator threshold is in the length class that contains it. |
u_bound |
A numeric vector of length |
prob |
A numeric value or vector between 0 and 1 denoting the LQ to be calculated. |
mid |
A numeric vector of length |
Value
calc_LFI
returns a numeric value or vector representing the proportion of the biomass in the length classes above bry
and in prop
of the biomass in the length class bry
.
calc_TYL
returns a numeric value or vector representing the biomass-weighted geometric mean length of the community.
calc_LQ
returns a numeric value or vector representing the length at which biomass exceeds a given proportion prob
of the total biomass.
See Also
Examples
# Set up and run the model
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par$Lmat, other=1e11)
effort <- matrix(0.5, 10, dim(NS_params@Qs)[3])
model_run <- run_LeMans(NS_params, years=10, effort=effort)
# Calculate the LFI for 40cm
bry <- which(NS_params@l_bound<=40 & NS_params@u_bound>40)
length_LFI <- 40
prop <- (length_LFI-NS_params@l_bound[bry])/(NS_params@u_bound[bry]-NS_params@l_bound[bry])
LFI <- calc_LFI(model_run@N[,,101], NS_params@wgt, bry, prop)
# Calculate TyL for the final time step
calc_TyL(wgt=NS_params@wgt, mid=NS_params@mid, N=model_run@N[,,101])
# Calculate the LQ for the final time step
calc_LQ(wgt=NS_params@wgt, u_bound=NS_params@u_bound, N=model_run@N[,,101], prob=0.5)