rct3: Run a calibrated regression to predict recruitment

Description Usage Arguments Value Note References See Also Examples

View source: R/rct3.R

Description

Function to run a calibrated regression to predict recruitment using the method decribed by Shepherd (1997)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rct3(
  formula,
  data,
  predictions = NULL,
  shrink = FALSE,
  power = 3,
  range = 20,
  min.se = 0.2,
  old = TRUE
)

Arguments

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.

Value

Object of class rct3.

Note

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

References

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

See Also

rct3-package gives an overview of the package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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"])

rct3 documentation built on Oct. 23, 2020, 8:18 p.m.