doVelCalib {diveMove}R Documentation

Calibration of TDR velocity

Description

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

Usage

doVelCalib(rates, vel, 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 velocity.
vel numeric vector with uncalibrated velocities.
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 velocity, 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, colramp only is recognized.

Details

Provide calibrated velocities in a TDR record, using the quantile regression of velocity 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 velocity, 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 velocity conditional on rate of depth change. The calibrated velocity is v_c=(v_u - a)/b, where v_c is the calibrated velocity, v_u is the uncalibrated velocity, and a and b are the intercept and slope of the quantile regression, respectively.

Value

If calType is not “none”, a list of two elements:

coefficients numeric vector of length two with the intercept and the slope of the quantile regression defining the calibration curve.
corrVel numeric vector as long as vel with the calibrated velocities.


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.

Author(s)

Sebastian P. Luque spluque@gmail.com

References

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

See Also

TDRcalibrate-class, rqPlot


[Package diveMove version 0.1-6 Index]