Learn R Programming

diveMove (version 0.6-6)

doSpeedCalib: Calibration of TDR speed

Description

Calibrate speed readings from a TDR, based on the principles outlined in Blackwell et al. (1999).

Usage

doSpeedCalib(rates, speed, calType="pooled", bad=c(0, 0), filename,
             postscript=FALSE, ...)

Arguments

rates
two-element list corresponding to descent and ascent phases of dives, respectively. Each element should be a 3-column matrix with dive id, rate of depth change, and mean speed.
speed
numeric vector with uncalibrated speeds.
calType
string specifying the type of calibration to perform. It should be one of descent, ascent, or pooled.
bad
vector of length 2 indicating values for rate of depth change and mean speed, respectively, below which data should be excluded to build the calibration curve.
filename
string indicating name of file to use as base name for the output postscript file.
postscript
logical; whether output plot to eps.
...
arguments passed to rqPlot; currently, xlab, ylab, and colramp.

Value

  • If calType is not none, a list of two elements:
  • coefficientsnumeric vector of length two with the intercept and the slope of the quantile regression defining the calibration curve.
  • corrSpeednumeric vector as long as speed with the calibrated speeds.
  • A plot (possibly via postscript, depending on the value of postscript argument) of the calibration lines for all possible cases: descent, ascent, and pooled, is created as a side effect.

Details

Provide calibrated speeds in a TDR record, using the quantile regression of speed on rate of depth change, based on principles outlined in Blackwell et al. (1999). Choice of calibrating against pooled, or descentr ascent phases.

The function takes the rates of depth change and speed, for each phase of the dive separately or combined (based on the value of calType). It subsequently fits a quantile regression through the second percentile of the distribution of speed conditional on rate of depth change. The calibrated speed is $s_{c} = \frac{s_{u} - a}{b}$, where $s_{c}$ is the calibrated speed, $s_{u}$ is the uncalibrated speed, and $a$ and $b$ are the intercept and slope of the quantile regression, respectively.

References

Blackwell, S. (1999) A method for calibrating swim-speed recorders. Marine Mammal Science 15(3): 894-905.

See Also

TDRcalibrate-class, rqPlot