srStartsDP: Uses dynamic plots to find reasonable starting values for...

Description Usage Arguments Details Value IFAR Chapter Author(s) References See Also Examples

View source: R/srStartsDP.R

Description

Uses dynamic plots to find reasonable starting values for parameters in specific parameterizations of the “Beverton-Holt”, “Ricker”, “Shepherd”, or “Saila-Lorda” stock-recruitment models. Use srFunShow described in stockRecruitment for the equations of each model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
srStartsDP(
  formula,
  data = NULL,
  type = c("BevertonHolt", "Ricker", "Shepherd", "SailaLorda", "independence"),
  param = 1,
  min.prop = 0.1,
  max.mult = 3,
  delta.prop = 0.005,
  ...
)

Arguments

formula

A formula of the form Recruits~Stock.

data

A data frame in which Recruits and Stock are found.

type

A string that indicates the type of the stock-recruitment model. Must be one of "BevertonHolt", "Ricker", "Shepherd", or "SailaLorda".

param

A numeric that indicates the parameterization of the stock-recruitment model type. This is ignored if type="Shepherd" or type="SailaLorda"

min.prop

A single numeric that is used to set the minimum values for the slider bars in the dynamic plot. see details.

max.mult

A single numeric that is used to set the maximum values for the slider bars in the dynamic plot. see details.

delta.prop

A single numeric that is used to set the step value for the slider bars in the dynamic plots. See details.

...

Further arguments passed to the methods.

Details

Starting values can be obtained by plotting the data with the model superimposed but tied to slider bars for changing parameters. One can change the parameters until a reasonable fit is observed and then use those valeus as starting values. The initial parameters for the slider bars are the starting values constructed as described in srStarts. The range for the sliders will have a minimum that is min.prop times the initial value and a maximum that is max.mult times the initial value. The step or interval of the slider bar is delta.mult times the initial value.

Value

Nothing, but a dynamic plot is created.

IFAR Chapter

13-Recruitment.

Author(s)

Derek H. Ogle, derek@derekogle.com

References

Ogle, D.H. 2016. Introductory Fisheries Analyses with R. Chapman & Hall/CRC, Boca Raton, FL.

See Also

See srStarts for related functionality.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Dynamic Plots Method -- ONLY RUN IN INTERACTIVE MODE
if (interactive()) {
  require(FSA)
  data(CodNorwegian)
  # Beverton-Holt
  srStartsDP(recruits~stock,data=CodNorwegian)
  srStartsDP(recruits~stock,data=CodNorwegian,param=2)
  srStartsDP(recruits~stock,data=CodNorwegian,param=3)
  srStartsDP(recruits~stock,data=CodNorwegian,param=4)
  # Ricker Models
  srStartsDP(recruits~stock,data=CodNorwegian,type="Ricker")
  srStartsDP(recruits~stock,data=CodNorwegian,type="Ricker",param=2)
  srStartsDP(recruits~stock,data=CodNorwegian,type="Ricker",param=3)
  # Shepherd, Saila-Lorda, and Independence Models
  srStartsDP(recruits~stock,data=CodNorwegian,type="Shepherd")
  srStartsDP(recruits~stock,data=CodNorwegian,type="SailaLorda")
  srStartsDP(recruits~stock,data=CodNorwegian,type="independence")
} ## END .. ONLY INTERACTIVE

droglenc/FSAsim documentation built on Feb. 15, 2020, 11:20 p.m.