tag_residuals_indirect: Indirect method for detecting tag obstruction

View source: R/tag_residuals_indirect.R

tag_residuals_indirectR Documentation

Indirect method for detecting tag obstruction

Description

tag_residuals_indirect fit a generalized additive model between surface light predictions from a global irradiance model (Frouin et al. 1989; fishmethods::astrocalc4r) and water column light, based on the position and time of the cast. Returns model residuals, estimate surface irradiance (photosynthetically active radiation), and solar position.

Usage

tag_residuals_indirect(
  x,
  formula = log10(trans_llight) ~ s(PAR, bs = "cr"),
  utc.offset = NULL,
  lat.col = "latitude",
  lon.col = "longitude",
  time.col = "start_time",
  light.col = "trans_llight",
  depth.bins = c(1, 3, 5, 7, 9),
  ...
)

Arguments

x

Data frame containing light at depth, depth, latitude (decimal degrees), longitude (decimal degrees), cast start time in POSIXct format, and timezone offset relative to UTC and unique identifiers for survey vessels, years, etc.

formula

an object of the class formula, passed to the generalized additive model. See documentation for gam.

utc.offset

A numeric vector providing the timezone offset relative to UTC. See documentation for astrocalc4r.

lat.col

A character vector with the name of the column containing latitude.

lon.col

A character vector with the name of the column containing longitude.

time.col

A character vector with the name of the column containing start time.

light.col

A character vector with the name of the column containing water column light measurements.

...

Additional values for gam.

Value

Returns a data frame containing input data, solar position, photosynthetically active radiation, and generalized additive model residuals.

Author(s)

Sean Rohan sean.rohan@noaa.gov

References

Frouin, R., Lingner, D.W., Gautier, C., Baker, K.S., and Smith, R.C. 1989. A simple analytical formula to compute clear sky total and photosynthetically available solar irradiance at the ocean surface. J. Geophys. Res. 94(C7): 9731. doi:10.1029/JC094iC07p09731.

Gary A. Nelson (2017). fishmethods: Fishery Science Methods and Models in R. R package version 1.10-4.https://CRAN.R-project.org/package=fishmethods

Wood, S.N. (2011) Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society (B) 73(1):3-36


sean-rohan/trawllight documentation built on Jan. 13, 2023, 10:43 p.m.