ApplyPlanBsmooth: Applies the Plan B smooth approach.

Description Usage Arguments

View source: R/apply_PlanBsmooth.r

Description

Smooths data (Year and Biomass Index) using loess, applies log linear regression to most recent three years, and retransforms back to estimate multiplier for catch advice.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ApplyPlanBsmooth(
  dat,
  od = ".\\",
  my.title = "",
  terminal.year = NA,
  nyears = 33,
  loess.span = NA,
  saveplots = FALSE,
  showplots = TRUE,
  nameplots = ""
)

Arguments

dat

data frame of Year and avg (the biomass index)

od

output directory where plots are saved (default=working directory)

my.title

title for time series plot with loess smooth (default = "")

terminal.year

last year used in smooth (allows easy retro analysis) (default = NA = most recent)

nyears

number of years to use in loess (default = 33)

loess.span

proportion time series used in smoothing (default = NA, calculates span=9.9/nyears)

saveplots

true/false flag to save output to od (default=FALSE)

showplots

true/false flag to display plots in window (default=TRUE)

nameplots

added to start of saved files (default=""), spaces not recommended


cmlegault/PlanBsmooth documentation built on Aug. 31, 2021, 8:48 p.m.