Title: | Functions to Predict Fish Year-Class Strength from Survey Data |
---|---|
Description: | Functions to predict fish year-class strength by calibration regression analysis of multiple recruitment index series. |
Authors: | Colin Millar [aut, cre], Marc Taylor [aut] |
Maintainer: | Colin Millar <[email protected]> |
License: | GPL-3 |
Version: | 1.0.3 |
Built: | 2024-11-01 11:23:03 UTC |
Source: | https://github.com/ices-tools-prod/rct3 |
Function to run a calibrated regression to predict recruitment using the method decribed by Shepherd
rct3 |
run a calibrated regression to predict rectruitment |
print.rct3 |
print a rct3 object |
summary.rct3 |
summarise a rct3 object |
J. G. Shepherd, Prediction of year-class strength by calibration regression analysis of multiple recruit index series, ICES Journal of Marine Science, Volume 54, Issue 5, October 1997, Pages 741–752, https://doi.org/10.1006/jmsc.1997.0222
Print an rct3 fit showing the model settings and predicted recruitments
## S3 method for class 'rct3' print(x, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'rct3' print(x, digits = max(3, getOption("digits") - 3), ...)
x |
an object of class rct3 - an output from the rct3 function. |
digits |
optional integer for how much to round the values in the output tables. |
... |
additional arguments to print.data.frame |
invisibly returns a summary data frame.
rct3
run a calibrated regression to predict rectruitment.
summary.rct3
summarise a rct3 object
rct3-package
gives an overview of the package.
# load recruitment data data(recdata) formula <- recruitment ~ NT1 + NT2 + NT3 + NAK1 + NAK2 + NAK3 + RT1 + RT2 + RT3 + EC01 + ECO2 + ECO3 my_rct3 <- rct3(formula, recdata, predictions = 2012:2017, shrink = TRUE) # see a short summary my_rct3 # for a full summary do: summary(my_rct3) # the components are here: my_rct3$rct3 my_rct3$rct3.summary # predicted recruitment t(my_rct3$rct3.summary["WAP"])
# load recruitment data data(recdata) formula <- recruitment ~ NT1 + NT2 + NT3 + NAK1 + NAK2 + NAK3 + RT1 + RT2 + RT3 + EC01 + ECO2 + ECO3 my_rct3 <- rct3(formula, recdata, predictions = 2012:2017, shrink = TRUE) # see a short summary my_rct3 # for a full summary do: summary(my_rct3) # the components are here: my_rct3$rct3 my_rct3$rct3.summary # predicted recruitment t(my_rct3$rct3.summary["WAP"])
Function to run a calibrated regression to predict recruitment using the method decribed by Shepherd (1997)
rct3( formula, data, predictions = NULL, shrink = FALSE, power = 3, range = 20, min.se = 0.2, old = TRUE )
rct3( formula, data, predictions = NULL, shrink = FALSE, power = 3, range = 20, min.se = 0.2, old = TRUE )
formula |
a formula to define which surveys to use in the recruitment estimation. |
data |
a dataframe with one column named 'yearclass' and other columns with the recruitment and the survey index relavent for that recruitment value |
predictions |
which yearclasses to make recruitment predictions for |
shrink |
shrink predictions to the VPA mean? |
power |
the power to use 0 - no weighting, 2 - bisquare, 3 - tricubic |
range |
the year range to use in the time tapered weighting |
min.se |
the minimum standard error used in the weighting of predictions |
old |
default TRUE, defines how to treat zero values. In the origional implmentation al values were transformed using log(x + 1), old=TRUE maintains this. |
Object of class rct3
.
This function was written based on the publication by Shepherd (1997) with additional reverse engeneering by comparing results to previous examples run using the RCT3 ver3.1 dos program
J. G. Shepherd, Prediction of year-class strength by calibration regression analysis of multiple recruit index series, ICES Journal of Marine Science, Volume 54, Issue 5, October 1997, Pages 741–752, https://doi.org/10.1006/jmsc.1997.0222
rct3-package
gives an overview of the package.
# load recruitment data data(recdata) formula <- recruitment ~ NT1 + NT2 + NT3 + NAK1 + NAK2 + NAK3 + RT1 + RT2 + RT3 + EC01 + ECO2 + ECO3 my_rct3 <- rct3(formula, recdata, predictions = 2012:2017, shrink = TRUE) # see a short summary my_rct3 # for a full summary do: summary(my_rct3) # the components are here: my_rct3$rct3 my_rct3$rct3.summary # predicted recruitment t(my_rct3$rct3.summary["WAP"])
# load recruitment data data(recdata) formula <- recruitment ~ NT1 + NT2 + NT3 + NAK1 + NAK2 + NAK3 + RT1 + RT2 + RT3 + EC01 + ECO2 + ECO3 my_rct3 <- rct3(formula, recdata, predictions = 2012:2017, shrink = TRUE) # see a short summary my_rct3 # for a full summary do: summary(my_rct3) # the components are here: my_rct3$rct3 my_rct3$rct3.summary # predicted recruitment t(my_rct3$rct3.summary["WAP"])
data.frame containing recruitment (age 3) and survey indices from several surveys over ages 1 to 3
recdata
recdata
Data frame containing 14 columns:
yearclass |
the yearclass |
recruitment |
the recruiment (age 3) for that yearclass |
NT1 |
The age 1 survey index from 'NT' survey |
NT2 |
The age 2 survey index from 'NT' survey |
... |
and so on |
rct3
run a calibrated regression to predict rectruitment.
rct3-package
gives an overview of the package.
Print an rct3 fit showing the model settings, a summary of the prediction for each yearclass and the overall predicted recruitments
## S3 method for class 'rct3' summary(object, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'rct3' summary(object, digits = max(3, getOption("digits") - 3), ...)
object |
an object of class rct3 - an output from the rct3 function. |
digits |
optional integer for how much to round the values in the output tables. |
... |
additional arguments to print.data.frame |
invisibly returns a summary data frame.
rct3
run a calibrated regression to predict rectruitment.
rct3-package
gives an overview of the package.
# load recruitment data data(recdata) formula <- recruitment ~ NT1 + NT2 + NT3 + NAK1 + NAK2 + NAK3 + RT1 + RT2 + RT3 + EC01 + ECO2 + ECO3 my_rct3 <- rct3(formula, recdata, predictions = 2012:2017, shrink = TRUE) # see a short summary my_rct3 # for a full summary do: summary(my_rct3) # the components are here: my_rct3$rct3 my_rct3$rct3.summary # predicted recruitment t(my_rct3$rct3.summary["WAP"])
# load recruitment data data(recdata) formula <- recruitment ~ NT1 + NT2 + NT3 + NAK1 + NAK2 + NAK3 + RT1 + RT2 + RT3 + EC01 + ECO2 + ECO3 my_rct3 <- rct3(formula, recdata, predictions = 2012:2017, shrink = TRUE) # see a short summary my_rct3 # for a full summary do: summary(my_rct3) # the components are here: my_rct3$rct3 my_rct3$rct3.summary # predicted recruitment t(my_rct3$rct3.summary["WAP"])