Title: | Mean Length-Based Estimators of Mortality using TMB |
---|---|
Description: | Estimation functions and diagnostic tools for mean length-based total mortality estimators based on Gedamke and Hoenig (2006) <doi:10.1577/T05-153.1>. |
Authors: | Quang Huynh [aut, cre], Todd Gedamke [ctb], Amy Then [ctb] |
Maintainer: | Quang Huynh <[email protected]> |
License: | GPL-2 |
Version: | 0.1.5 |
Built: | 2025-02-22 05:26:34 UTC |
Source: | https://github.com/quang-huynh/mlz |
A tool to bin raw length observations into a length frequency matrix.
bin_length(df, breaks = NULL)
bin_length(df, breaks = NULL)
df |
A data frame or matrix of length observations. The first column should be named 'Year' and the second column should be named 'Length'. |
breaks |
An optional vector for breaks for |
Length frequencies from Len_df
are created by using hist
function.
A list with length bins, years, and frequency matrix.
## Not run: data(SilkSnapper) Silk.matrix <- bin_length(SilkSnapper, breaks = seq(80, 830, 10)) Silk.matrix <- bin_length(SilkSnapper) new.dataset <- new("MLZ_data", Year = Silk.matrix$Year, Len_bins = Silk.matrix$Len_bins, Len_matrix = Silk.matrix$Len_matrix) ## End(Not run)
## Not run: data(SilkSnapper) Silk.matrix <- bin_length(SilkSnapper, breaks = seq(80, 830, 10)) Silk.matrix <- bin_length(SilkSnapper) new.dataset <- new("MLZ_data", Year = Silk.matrix$Year, Len_bins = Silk.matrix$Len_bins, Len_matrix = Silk.matrix$Len_matrix) ## End(Not run)
Calculates mean lengths from length data and Lc for class MLZ_data
.
calc_ML(MLZ_data, length.slot = c("Len_df", "Len_matrix"), sample.size = TRUE)
calc_ML(MLZ_data, length.slot = c("Len_df", "Len_matrix"), sample.size = TRUE)
MLZ_data |
An object of class |
length.slot |
Name of slot in |
sample.size |
If |
An object of class MLZ_data
to fill slots MeanLength
, ss
.
## Not run: data(Nephrops) Nephrops <- calc_ML(Nephrops, sample.size = FALSE) Nephrops@MeanLength plot(Nephrops) ## End(Not run)
## Not run: data(Nephrops) Nephrops <- calc_ML(Nephrops, sample.size = FALSE) Nephrops@MeanLength plot(Nephrops) ## End(Not run)
Produces a matrix of AIC for model selection.
compare_models(..., figure = TRUE, color = NULL)
compare_models(..., figure = TRUE, color = NULL)
... |
Multiple objects of class |
figure |
If |
color |
Optional vector of colors for the figure each representing a separate model
in |
## Not run: data(Goosefish) goose <- ML(Goosefish, ncp = 0) goose1 <- ML(Goosefish, ncp = 1) goose2 <- ML(Goosefish, ncp = 2, grid.search = TRUE, figure = FALSE) compare_models(goose, goose1, goose2) data(PRSnapper) ssm <- MLmulti(PRSnapper, ncp = 1, model = "SSM") msm1 <- MLmulti(PRSnapper, ncp = 1, model = "MSM1") msm2 <- MLmulti(PRSnapper, ncp = 1, model = "MSM2") msm3 <- MLmulti(PRSnapper, ncp = 1, model = "MSM3") compare_models(ssm, msm1, msm2, msm3) ## End(Not run)
## Not run: data(Goosefish) goose <- ML(Goosefish, ncp = 0) goose1 <- ML(Goosefish, ncp = 1) goose2 <- ML(Goosefish, ncp = 2, grid.search = TRUE, figure = FALSE) compare_models(goose, goose1, goose2) data(PRSnapper) ssm <- MLmulti(PRSnapper, ncp = 1, model = "SSM") msm1 <- MLmulti(PRSnapper, ncp = 1, model = "MSM1") msm2 <- MLmulti(PRSnapper, ncp = 1, model = "MSM2") msm3 <- MLmulti(PRSnapper, ncp = 1, model = "MSM3") compare_models(ssm, msm1, msm2, msm3) ## End(Not run)
Mean lengths and life history for goosefish.
Goosefish
Goosefish
An object of class MLZ_data
.
Gedamke, T. and Hoenig, J.M. 2006. Estimating mortality from mean length data in nonequilibrium situations, with application to the assessment of goosefish. Transactions of the American Fisheries Society 135:476-487.
data(Goosefish); Goosefish
data(Goosefish); Goosefish
Estimator of instantaneous total mortality (Z) from a time series of mean length data.
ML(MLZ_data, ncp, start = NULL, grid.search = TRUE, parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, Z.max = 5, figure = TRUE)
ML(MLZ_data, ncp, start = NULL, grid.search = TRUE, parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, Z.max = 5, figure = TRUE)
MLZ_data |
An object of class |
ncp |
The number of change points in total mortality in the time series. |
start |
An optional list of starting values. See details. |
grid.search |
If |
parallel |
Whether grid search is performed with parallel processing. Ignored if |
min.time |
The minimum number of years between each change point for the grid search, passed
to |
Z.max |
The upper boundary for Z estimates. |
figure |
If |
For a model with I
change points, the starting values in
start
is a list with the following entries:
Z a vector of length = I+1
.
yearZ a vector of length = I
.
start
can be NULL
, in which case, the supplied starting values depend on
the value of grid.search
. If grid.search = TRUE
, starting values will use the
values for yearZ
which minimize the negative log-likelihood from the grid search.
Otherwise, the starting values for yearZ
evenly divide the time series.
An object of class MLZ_model
.
Gedamke, T. and Hoenig, J.M. 2006. Estimating mortality from mean length data in nonequilibrium situations, with application to the assessment of goosefish. Transactions of the American Fisheries Society 135:476-487.
## Not run: data(Goosefish) res <- ML(Goosefish, ncp = 2) res <- ML(Goosefish, ncp = 2, start = list(Z = c(0.1, 0.3, 0.5), yearZ = c(1978, 1988))) res <- ML(Goosefish, ncp = 2, grid.search = TRUE) ## End(Not run)
## Not run: data(Goosefish) res <- ML(Goosefish, ncp = 2) res <- ML(Goosefish, ncp = 2, start = list(Z = c(0.1, 0.3, 0.5), yearZ = c(1978, 1988))) res <- ML(Goosefish, ncp = 2, grid.search = TRUE) ## End(Not run)
Estimator of instantaneous total mortality (Z) from a time series of mean length data.
MLCR(MLZ_data, ncp, CPUE.type = c(NA, "WPUE", "NPUE"), loglikeCPUE = c("lognormal", "normal"), start = NULL, grid.search = TRUE, parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, Z.max = 5, figure = TRUE)
MLCR(MLZ_data, ncp, CPUE.type = c(NA, "WPUE", "NPUE"), loglikeCPUE = c("lognormal", "normal"), start = NULL, grid.search = TRUE, parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, Z.max = 5, figure = TRUE)
MLZ_data |
An object of class |
ncp |
The number of change points in total mortality in the time series. |
CPUE.type |
Indicates whether CPUE time series is abundance or biomass based. |
loglikeCPUE |
Indicates whether the log-likelihood for the CPUE will be lognormally or normally distributed. |
start |
An optional list of starting values. See details. |
grid.search |
If |
parallel |
Whether grid search is performed with parallel processing. Ignored if |
min.time |
The minimum number of years between each change point for the grid search, passed
to |
Z.max |
The upper boundary for Z estimates. |
figure |
If |
For a model with I
change points, the starting values in
start
is a list with the following entries:
Z a vector of length = I+1
.
yearZ a vector of length = I
.
start
can be NULL
, in which case, the supplied starting values depend on
the value of grid.search
. If grid.search = TRUE
, starting values will use the
values for yearZ
which minimize the negative log-likelihood from the grid search.
Otherwise, the starting values for yearZ
evenly divide the time series.
An object of class MLZ_model
.
Huynh, Q.C., Gedamke, T., Porch, C.E., Hoenig, J.M., Walter, J.F, Bryan, M., and Brodziak, J. In revision. Estimating Total Mortality Rates from Mean Lengths and Catch Rates in Non-equilibrium Situations. Transactions of the American Fisheries Society.
## Not run: data(MuttonSnapper) MLCR(MuttonSnapper, ncp = 2, CPUE.type = "WPUE", grid.search = TRUE) ## End(Not run)
## Not run: data(MuttonSnapper) MLCR(MuttonSnapper, ncp = 2, CPUE.type = "WPUE", grid.search = TRUE) ## End(Not run)
Estimator of fishing and natural mortality from a time series of mean length and effort data.
MLeffort(MLZ_data, start, n_age, estimate.M = TRUE, log.par = FALSE, eff_init = 0, n_season = 1L, obs_season = 1L, timing = 0, figure = TRUE)
MLeffort(MLZ_data, start, n_age, estimate.M = TRUE, log.par = FALSE, eff_init = 0, n_season = 1L, obs_season = 1L, timing = 0, figure = TRUE)
MLZ_data |
An object of class |
start |
A list of starting values. Names of start list must contain |
n_age |
The number of ages above age tc in the model. |
estimate.M |
If |
log.par |
Whether parameters are estimated in logspace ( |
eff_init |
The assumed equilibrium effort prior to the first year of the model (0 = virgin conditions). |
n_season |
The number of seasons modeled in a year. |
obs_season |
The season corresponding to the observed mean lengths. |
timing |
The fraction of time (i.e., between 0 - 1) within |
figure |
If |
An object of class MLZ_model
.
Then, A.Y, Hoenig, J.M, and Huynh, Q.C. In revision. Estimating fishing and natural mortality rates, and catchability coefficient, from a series of observations on mean length and fishing effort. ICES Journal of Marine Science.
## Not run: data(Nephrops) Nephrops <- calc_ML(Nephrops, sample.size = FALSE) res <- MLeffort(Nephrops, start = list(q = 0.1, M = 0.2), n_age = 24, eff_init = Nephrops@Effort[1]) ## End(Not run)
## Not run: data(Nephrops) Nephrops <- calc_ML(Nephrops, sample.size = FALSE) res <- MLeffort(Nephrops, start = list(q = 0.1, M = 0.2), n_age = 24, eff_init = Nephrops@Effort[1]) ## End(Not run)
Estimator of instantaneous total mortality (Z) from a time series of mean length data for a suite of stocks that are fished together.
MLmulti(MLZ.list, ncp, model = c("SSM", "MSM1", "MSM2", "MSM3"), start = NULL, grid.search = TRUE, parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, Z.max = 5, figure = TRUE)
MLmulti(MLZ.list, ncp, model = c("SSM", "MSM1", "MSM2", "MSM3"), start = NULL, grid.search = TRUE, parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, Z.max = 5, figure = TRUE)
MLZ.list |
A list containing objects of class |
ncp |
The number of change points in total mortality in the time series. |
model |
The multispecies model to be used. |
start |
An optional list of starting values. See details. |
grid.search |
If |
parallel |
Whether grid search is performed in parallel. Ignored if |
min.time |
The minimum number of years between each change point for the grid search, passed
to |
Z.max |
The upper boundary for Z estimates. |
figure |
If |
For a model with I
change points and N
species, the starting values in
start
is a list with the following entries:
Single Species Model (SSM, independent trends in mortality among species):
Z |
a matrix with nrow = I+1 and ncol = N . |
yearZ |
a matrix with nrow = I and ncol = N . |
Multispecies Model 1 (MSM1, common mortality change points but changes in Z are independent):
Z |
a matrix with nrow = I+1 and ncol = N . |
yearZ |
a vector with length = I . |
Multispecies Model 2 (MSM2, common mortality change points. Changes in F vary by estimated relative catchabilities among species):
Z1 |
a vector with length = N . |
yearZ |
a vector with length = I . |
delta |
a vector with length = I . |
epsilon |
a vector with length = N-1 . |
Multispecies Model 3 (MSM3, common mortality change points and common proportional changes in F):
Z1 |
a vector with length = N . |
yearZ |
a vector with length = I . |
delta |
a vector with length = I . |
If ncp = 0
change points is specified, then the method simplifies to the Single Species Model.
The start
list should contain a single entry:
Z |
a vector with length = N . |
start
can be NULL
, in which case, the supplied starting values depend on
the value of grid.search
. If grid.search = TRUE
, starting values will use the
values for yearZ
which minimize the negative log-likelihood from the grid search.
Otherwise, the starting values for yearZ
evenly divide the time series.
An object of class MLZ_model
.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. 2017. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries 9:68-78.
## Not run: data(PRSnapper) res_eq <- MLmulti(PRSnapper, ncp = 0, start = list(Z = matrix(0.5, nrow = 1, ncol = 3))) res_SSM <- MLmulti(PRSnapper, ncp = 1, model = "SSM") MSM1.start.Z <- matrix(0.5, nrow = 2, ncol = 3) MSM1.start.yearZ <- 1990 start.list <- list(Z = MSM1.start.Z, yearZ = MSM1.start.yearZ) res_MSM1 <- MLmulti(PRSnapper, ncp = 1, model = "MSM1", start = start.list, grid.search = FALSE) res_MSM2 <- MLmulti(PRSnapper, ncp = 1, model = "MSM2") st.Z1 <- rep(0.5, 3) st.yearZ <- 1990 st.delta <- 1 start.list <- list(Z1 = st.Z1, yearZ = st.yearZ, delta = st.delta) resMSM3 <- MLmulti(PRSnapper, ncp = 1, model = "MSM3", start = start.list) ## End(Not run)
## Not run: data(PRSnapper) res_eq <- MLmulti(PRSnapper, ncp = 0, start = list(Z = matrix(0.5, nrow = 1, ncol = 3))) res_SSM <- MLmulti(PRSnapper, ncp = 1, model = "SSM") MSM1.start.Z <- matrix(0.5, nrow = 2, ncol = 3) MSM1.start.yearZ <- 1990 start.list <- list(Z = MSM1.start.Z, yearZ = MSM1.start.yearZ) res_MSM1 <- MLmulti(PRSnapper, ncp = 1, model = "MSM1", start = start.list, grid.search = FALSE) res_MSM2 <- MLmulti(PRSnapper, ncp = 1, model = "MSM2") st.Z1 <- rep(0.5, 3) st.yearZ <- 1990 st.delta <- 1 start.list <- list(Z1 = st.Z1, yearZ = st.yearZ, delta = st.delta) resMSM3 <- MLmulti(PRSnapper, ncp = 1, model = "MSM3", start = start.list) ## End(Not run)
An S4 class for storing data and life history parameters for a single stock.
Method functions summary
and plot
are available for this class (see examples).
Stock
Name of stock.
Year
A vector of years to be considered in the model. Missing years are permitted.
Len_bins
A vector of midpoints of length bins for Len_matrix
.
Len_matrix
A matrix of size data. The i-th row corresponds to the i-th year in MLZ_data@Year
. The j-th column indexes the j-th length in MLZ_data@Len_bins
.
Len_df
A data frame containing individual length observations. The first column should be the Year and the second column should be the length.
vbLinf
L-infinity from the von Bertalanffy growth function.
vbK
Parameter K from the von Bertalanffy growth function.
vbt0
Parameter t0 from the von Bertalanffy growth function.
Lc
Length of full selectivity.
M
Natural mortality rate. If specified, this is also the lower limit for Z.
lwb
Exponent b
from the allometric length-weight function .
MeanLength
Vector of mean lengths of animals larger than Lc. The i-th entry corresponds to the i-th year in MLZ_data@Year
.
ss
Vector of annual sample sizes for MeanLength. The i-th entry corresponds to the i-th year in MLZ_data@Year
.
CPUE
Vector of catch-per-unit-effort data. The i-th entry corresponds to the i-th year in MLZ_data@Year
.
Effort
Vector of effort data. The i-th entry corresponds to the i-th year in MLZ_data@Year
.
length.units
Unit of measurement for lengths, i.e. "cm" or "mm".
data(Goosefish); Goosefish summary(Goosefish) plot(Goosefish) new("MLZ_data")
data(Goosefish); Goosefish summary(Goosefish) plot(Goosefish) new("MLZ_data")
An S4 class for storing model results.
Method functions summary
and plot
are available for this class (see examples).
Stock
Name of stock (obtained from an object of class MLZ_data
).
Model
Name of model used for mortality estimation.
time.series
A data frame summarizing observed time series data and predicted values from model.
estimates
A matrix of parameter estimates and derived values and their standard errors, from
sdreport
.
negLL
The negative log-likelihood from the model.
n.changepoint
The number of change points in the model.
n.species
The number of species/stocks in the model.
grid.search
A data frame reporting the log-likelihood values from a grid search over change points.
See profile_ML
, profile_MLCR
, and profile_MLmulti
.
obj
A list with components from MakeADFun
.
opt
A list with components from calling optim
to obj
.
sdrep
A class sdreport
list with components from calling sdreport
to obj
.
length.units
Unit of measurement for lengths, i.e. "cm" or "mm".
## Not run: data(Goosefish) goose.model <- ML(Goosefish, ncp = 2, grid.search = FALSE, figure = FALSE) class(goose.model) summary(goose.model) plot(goose.model, residuals = FALSE) ## End(Not run)
## Not run: data(Goosefish) goose.model <- ML(Goosefish, ncp = 2, grid.search = FALSE, figure = FALSE) class(goose.model) summary(goose.model) plot(goose.model, residuals = FALSE) ## End(Not run)
Calculates the annual modal length from the length data, which can be used to select Lc. Note: Modal length can change over time for many reasons, including a change in mortality (Hordyk et al. 2015), recruitment, or selectivity (Huynh et al. 2017).
modal_length(MLZ_data, length.slot = c("Len_df", "Len_matrix"), breaks = NULL, figure = TRUE)
modal_length(MLZ_data, length.slot = c("Len_df", "Len_matrix"), breaks = NULL, figure = TRUE)
MLZ_data |
An object of class |
length.slot |
Name of slot in |
breaks |
Only used for |
figure |
If TRUE, a plot is also drawn. |
Length frequency matrix from Len_df
are created by using hist
function.
A data frame of plotted values.
Hordyk, A. Ono, K., Sainsbury, K., Loneragan, N., and Prince, J. 2015. Some explorations of the life history ratios to describe length composition, spawning-per-recruit, and the spawning potential ratio. ICES Journal of Marine Science 72:204-216.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. 2017. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries 9:68-78.
## Not run: data(Nephrops) modal_length(Nephrops) data(SilkSnapper) new.dataset <- new("MLZ_data", Year = 1983:2013, Len_df = SilkSnapper) modal_length(new.dataset) modal_length(new.dataset, breaks = seq(80, 830, 10)) ## End(Not run)
## Not run: data(Nephrops) modal_length(Nephrops) data(SilkSnapper) new.dataset <- new("MLZ_data", Year = 1983:2013, Len_df = SilkSnapper) modal_length(new.dataset) modal_length(new.dataset, breaks = seq(80, 830, 10)) ## End(Not run)
Mean lengths, CPUE, and life history for Puerto Rico mutton snapper.
MuttonSnapper
MuttonSnapper
An object of class MLZ_data
.
Huynh, Q.C., Gedamke, T., Porch, C.E., Hoenig, J.M., Walter, J.F, Bryan, M, and Brodziak, J. In revision. Estimating Total Mortality Rates from Mean Lengths and Catch Rates in Non-equilibrium Situations. Transactions of the American Fisheries Society.
data(MuttonSnapper)
data(MuttonSnapper)
An S4 object containing length and effort time series and life history parameters of male Nephrops in FU 28-29.
Nephrops
Nephrops
An object of class MLZ_data
.
Then, A.Y, Hoenig, J.M, and Huynh, Q.C. In revision. Estimating fishing and natural mortality rates, and catchability coefficient, from a series of observations on mean length and fishing effort. ICES Journal of Marine Science.
data(Nephrops)
data(Nephrops)
plot
method for S4 class MLZ_data
Plots annual length frequencies from slot Len_matrix
or Len_df
. If there are data in
both slots, Len_matrix
is preferentially plotted.
## S4 method for signature 'MLZ_data' plot(x, type = c("ML", "comp"), ggplot_layer = NULL)
## S4 method for signature 'MLZ_data' plot(x, type = c("ML", "comp"), ggplot_layer = NULL)
x |
An object of class |
type |
Character. |
ggplot_layer |
Optional layers to add to ggplot2 plot for |
## Not run: data(Nephrops) plot(Nephrops) plot(Nephrops, type = "ML") ## End(Not run)
## Not run: data(Nephrops) plot(Nephrops) plot(Nephrops, type = "ML") ## End(Not run)
plot
method for S4 class MLZ_model
Plots time series of observed and predicted data from an object of class MLZ_model
.
## S4 method for signature 'MLZ_model' plot(x, residuals = TRUE)
## S4 method for signature 'MLZ_model' plot(x, residuals = TRUE)
x |
An object of class |
residuals |
logical; whether a plot of residuals will also be produced. |
## Not run: data(Goosefish) goose.model <- ML(Goosefish, ncp = 2, grid.search = FALSE, figure = FALSE) plot(goose.model) ## End(Not run)
## Not run: data(Goosefish) goose.model <- ML(Goosefish, ncp = 2, grid.search = FALSE, figure = FALSE) plot(goose.model) ## End(Not run)
A grid search is performed over the time series, which can be used to identify local and global minima. A plot of the likelihood surface is also created similar to Figure 6 of Gedamke and Hoenig (2006) or Figure 3 of Huynh et al. (2017).
profile_ML(MLZ_data, ncp, startZ = rep(0.5, ncp + 1), min.time = 3, parallel = ifelse(ncp > 2, TRUE, FALSE), figure = TRUE, color = TRUE)
profile_ML(MLZ_data, ncp, startZ = rep(0.5, ncp + 1), min.time = 3, parallel = ifelse(ncp > 2, TRUE, FALSE), figure = TRUE, color = TRUE)
MLZ_data |
An object of class |
ncp |
The number of change points. |
startZ |
A vector of length |
min.time |
The minimum number of years between change points. Only used if |
parallel |
Whether grid search is performed using parallel processing. |
figure |
If |
color |
If |
A matrix of change points with the negative log-likelihood values.
Gedamke, T. and Hoenig, J.M. 2006. Estimating mortality from mean length data in nonequilibrium situations, with application to the assessment of goosefish. Transactions of the American Fisheries Society 135:476-487.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. 2017. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries 9:68-78.
## Not run: data(Goosefish) profile_ML(Goosefish, ncp = 1) profile_ML(Goosefish, ncp = 2) ## End(Not run)
## Not run: data(Goosefish) profile_ML(Goosefish, ncp = 1) profile_ML(Goosefish, ncp = 2) ## End(Not run)
A grid search is performed over the time series, which can be used to identify local and global minima. A plot of the likelihood surface is also created similar to Figure 6 of Gedamke and Hoenig (2006) or Figure 3 of Huynh et al. (2017).
profile_MLCR(MLZ_data, ncp, CPUE.type = c(NA, "NPUE", "WPUE"), loglikeCPUE = c("normal", "lognormal"), startZ = rep(0.5, ncp + 1), min.time = 3, parallel = ifelse(ncp > 2, TRUE, FALSE), figure = TRUE, color = TRUE)
profile_MLCR(MLZ_data, ncp, CPUE.type = c(NA, "NPUE", "WPUE"), loglikeCPUE = c("normal", "lognormal"), startZ = rep(0.5, ncp + 1), min.time = 3, parallel = ifelse(ncp > 2, TRUE, FALSE), figure = TRUE, color = TRUE)
MLZ_data |
An object of class |
ncp |
The number of change points. |
CPUE.type |
Indicates whether CPUE time series is abundance or biomass based. |
loglikeCPUE |
Indicates whether the log-likelihood for the CPUE will be lognormally or normally distributed. |
startZ |
A vector of length |
min.time |
The minimum number of years between change points. Only used if |
parallel |
Whether the grid search is performed with parallel processing. |
figure |
If |
color |
If |
A matrix of change points with the total negative log-likelihood values and values from the mean lengths and catch rates.
Gedamke, T. and Hoenig, J.M. 2006. Estimating mortality from mean length data in nonequilibrium situations, with application to the assessment of goosefish. Transactions of the American Fisheries Society 135:476-487.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. 2017. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries 9:68-78.
## Not run: data(MuttonSnapper) profile_MLCR(MuttonSnapper, ncp = 1, CPUE.type = 'WPUE') ## End(Not run)
## Not run: data(MuttonSnapper) profile_MLCR(MuttonSnapper, ncp = 1, CPUE.type = 'WPUE') ## End(Not run)
A grid search is performed over the time series, which can be used to identify local and global minima. A plot of the likelihood surface is also created similar to Figure 6 of Gedamke and Hoenig (2006) or Figure 3 of Huynh et al. (2017).
profile_MLmulti(MLZ.list, ncp, model = c("SSM", "MSM1", "MSM2", "MSM3"), startZ1 = rep(0.5, length(MLZ.list)), parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, figure = TRUE, color = TRUE)
profile_MLmulti(MLZ.list, ncp, model = c("SSM", "MSM1", "MSM2", "MSM3"), startZ1 = rep(0.5, length(MLZ.list)), parallel = ifelse(ncp > 2, TRUE, FALSE), min.time = 3, figure = TRUE, color = TRUE)
MLZ.list |
A list containing an object of class |
ncp |
The number of change points. |
model |
The name of the multispecies model for the grid search. |
startZ1 |
A vector of length |
parallel |
Whether the grid search is performed with parallel processing. |
min.time |
The minimum number of years between change points. Only used if |
figure |
If |
color |
If |
A matrix of change points with the total negative log-likelihood values and values from the each species.
Gedamke, T. and Hoenig, J.M. 2006. Estimating mortality from mean length data in nonequilibrium situations, with application to the assessment of goosefish. Transactions of the American Fisheries Society 135:476-487.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. 2017. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries 9:68-78.
## Not run: data(PRSnapper) profile_MLmulti(PRSnapper, ncp = 1, model = "MSM1") ## End(Not run)
## Not run: data(PRSnapper) profile_MLmulti(PRSnapper, ncp = 1, model = "MSM1") ## End(Not run)
Mean lengths and life history for 3 species in the Puerto Rico Deepwater Snapper Complex (Unit 1): silk snapper, blackfin snapper, and vermilion snapper.
PRSnapper
PRSnapper
A list containing objects of class MLZ_data
.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. In press. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries.
data(PRSnapper)
data(PRSnapper)
The function re-calculates mean lengths for each alternative value of Lc and re-estimates mortality. Currently supports only the ML estimator.
sensitivity_Lc(MLZ_data, MLZ_model, Lc.vec, grid.search = FALSE, figure = TRUE)
sensitivity_Lc(MLZ_data, MLZ_model, Lc.vec, grid.search = FALSE, figure = TRUE)
MLZ_data |
An object of class |
MLZ_model |
An object of class |
Lc.vec |
A vector of alternative Lc values. |
grid.search |
Whether a grid search is performed or not. By default, the starting values
in the sensitivity analysis are the estimates from object |
figure |
Whether a figure will be produced, similar to Figure 6 of Huynh et al. (2017). |
A matrix of mortality and change point estimates with each value Lc.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. 2017. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries 9:68-78.
## Not run: data(SilkSnapper) new.dataset <- new("MLZ_data", Year = 1983:2013, Len_df = SilkSnapper, length.units = "mm", vbLinf = 794, vbK = 0.1) new.dataset@Lc <- 310 new.dataset <- calc_ML(new.dataset) first.MLZmodel <- ML(new.dataset, 1) Lc.vec <- seq(240, 340, 5) sensitivity_Lc(new.dataset, first.MLZmodel, Lc.vec) ## End(Not run)
## Not run: data(SilkSnapper) new.dataset <- new("MLZ_data", Year = 1983:2013, Len_df = SilkSnapper, length.units = "mm", vbLinf = 794, vbK = 0.1) new.dataset@Lc <- 310 new.dataset <- calc_ML(new.dataset) first.MLZmodel <- ML(new.dataset, 1) Lc.vec <- seq(240, 340, 5) sensitivity_Lc(new.dataset, first.MLZmodel, Lc.vec) ## End(Not run)
Length observed from the Puerto Rico Silk Snapper handline fishery.
SilkSnapper
SilkSnapper
A data frame.
Huynh, Q.C, Gedamke, T., Hoenig, J.M, and Porch C. In press. Multispecies Extensions to a Nonequilibrium Length-Based Mortality Estimator. Marine and Coastal Fisheries.
## Not run: data(SilkSnapper) new("MLZ_data", Len_df = SilkSnapper) ## End(Not run)
## Not run: data(SilkSnapper) new("MLZ_data", Len_df = SilkSnapper) ## End(Not run)
summary
method for S4 class MLZ_data
summary
method for S4 class MLZ_data
## S4 method for signature 'MLZ_data' summary(object)
## S4 method for signature 'MLZ_data' summary(object)
object |
An object of class |
data(MuttonSnapper) summary(MuttonSnapper)
data(MuttonSnapper) summary(MuttonSnapper)
summary
method for S4 class MLZ_model
summary
method for S4 class MLZ_model
## S4 method for signature 'MLZ_model' summary(object)
## S4 method for signature 'MLZ_model' summary(object)
object |
An object of class |
## Not run: data(Goosefish) goose.model <- ML(Goosefish, ncp = 2, grid.search = FALSE) summary(goose.model) ## End(Not run)
## Not run: data(Goosefish) goose.model <- ML(Goosefish, ncp = 2, grid.search = FALSE) summary(goose.model) ## End(Not run)