select_Millar: Millar's selectivity model

View source: R/select_Millar.R

select_MillarR Documentation

Millar's selectivity model

Description

This model estimates the selecitvity of different gears from experimental catches.

Usage

select_Millar(
  param,
  x0 = NULL,
  rtype = "norm.loc",
  rel.power = NULL,
  plot = TRUE
)

Arguments

param

A list with following parameters: vector with midlengths of size classes (midLengths), vector with meshSizes in increasing order (meshSizes), and a matrix with the number of individuals caught with each sized mesh (CatchPerNet_mat).

x0

A string of initial values for the parameters to be optimized over when applying the function optim. When rtype = "norm.loc", "norm.sca", or "lognorm", initial values may be ommitted (x0 = NULL), and starting vallues will be estimated using the earlier approach of Millar and Holst (1997).

rtype

A character string indicating which method for estimating selection curves should be used: "norm.loc" for a normal curve with common spread, "norm.sca" for a normal curve with variable spread, "lognorm" for a lognormal curve, "binorm.sca" for a bi-normal curve, "bilognorm" for a bi-lognormal curve, "tt.logistic" for a control and logistic curve

rel.power

A string indicating the relative power of different meshSizes, must have same length as meshSizes (Default: rel.power = NULL).

plot

logical; should a plot be printed?

Details

Model adapted from the selectivity functions provided by Prof. Dr. Russell Millar (https://www.stat.auckland.ac.nz/~millar/). In the deviance plot open circles correspond to negative, closed to positive residuals. The size of the circles is proportional to the square of the residuals. To assess the model fit by the deviance plot it requires some experience, in general the pattern should be random and the sizes not too big. Please refer to Millar's publications and other publications for comparison. The model can produce errors if the starting values (x0) for the optim function are not realistic. Please be aware that if the method is changed the outcoming parameters can greatly vary. Simliarly the starting values have to be adapted when changing the method (rtype).

Source

https://www.stat.auckland.ac.nz/~millar/selectware/

References

Millar, R. B., Holst, R., 1997. Estimation of gillnet and hook selectivity using log-linear models. ICES Journal of Marine Science: Journal du Conseil, 54(3):471-477

Holt, S. J. 1963. A method for determining gear selectivity and its application. ICNAF Special Publication, 5: 106-115.

Examples

data(haddock)

output <- select_Millar(haddock, x0 = c(-10,0.3,0),
   rtype = "tt.logistic")

plot(output, plotlens=seq(25,35,0.1), deviance_plot = FALSE)
legend("topleft",c("Control","Experimental"), lty=1:2, col=1:2)


# Gillnet
data(gillnet)

# Using inital estimates from old method
select_Millar(gillnet, x0 = NULL, rtype = "norm.loc")$value
select_Millar(gillnet, x0 = NULL, rtype = "norm.sca")$value
select_Millar(gillnet, x0 = NULL, rtype = "lognorm")$value

# Two rtypes which require starting values
select_Millar(gillnet, x0 = c(55,4,65,4,3), rtype="binorm.sca")
select_Millar(gillnet, x0 = c(4,0.2,4.2,0.1,2), rtype="bilognorm")

# Calculation with finer length resolution
output <- select_Millar(gillnet, x0 = NULL, rtype = "lognorm")
plot(output, plotlens=seq(40,90,0.1))

# Use alternate plot settings
output <- select_Millar(gillnet, x0 = NULL, rtype = "lognorm")
ncolor <- length(output$meshSizes)
plot(output, plotlens=seq(40,90,0.1), deviance_plot = FALSE,
 lty=1, col=rainbow(ncolor))
legend("topleft", col=rainbow(ncolor), legend=output$meshSizes,
 lty=1, title="Mesh size [cm]")

 # deviance plot only
 plot(output, plotlens=seq(40,90,0.1), selectivity_plot = FALSE)


# Stacked trammel net
# The data come from two experiments using different mesh sizes
# This analysis assumes common retention curve in both experiments.
# Note that summary function does not produce residual plot
# since lengths are not unique
data(trammelnet)

output <- select_Millar(trammelnet, x0 = c(25,4),
   rtype="norm.loc", rel.power = rep(1,6))

plot(output,plotlens=seq(10,40,0.1))


tokami/TropFishR documentation built on Feb. 29, 2024, 11 p.m.