extract.slope {FishResp}R Documentation

Extraction of Slope(s)

Description

The function extracts the slopes of the linear regression of corrected O_{2} concentration over time with defined parameters (see Arguments).

Usage

extract.slope(clean.data,
              method = c("all", "min", "max",
                         "lower.tail", "upper.tail",
                         "calcSMR.mlnd", "calcSMR.quant",
                         "calcSMR.low10", "calcSMR.low10pc"),
              r2=0.95, length = 999999, n.slope = 1000,
              percent = 10, p = 0.25, G = 1:4)

Arguments

clean.data

a data frame obtained by using the function correct.meas

method

string: the method of extracting slopes:

  • 'all' all slopes

  • 'min' extracts lowest absolute slopes, specify the number of extracted
    slopes (parameter: n.slope)

  • 'max' extracts highest absolute slopes, specify the number of extracted slopes (parameter: n.slope)

  • 'lower.tail' extracts slopes from a lower tail of absolute slope distribution, specify percentage of a lower tail (parameter: percent)

  • 'upper.tail' extracts slopes from an upper tail of absolute slope distribution, specify percentage of an upper tail (parameter: percent)

  • 'calcSMR.mlnd' calculates the mean of the lowest normal distribution
    (MLND) using the parameter G (see Appendix S1 in Chabot et al, 2016)

  • 'calcSMR.quant' calculates quantile value of slope distribution using the parameter p (see Appendix S1 in Chabot et al, 2016)

  • 'calcSMR.low10' calculates the mean of the 10 lowest absolute slopes (see Appendix S1 in Chabot et al, 2016)

  • 'calcSMR.low10pc' calculates the mean of the lowest 10

r2

numeric: minimal coefficient of determination (r^{2}) for extracted slopes. Coefficient of determination is used as a threshold of quality to be determined by the user (by default r^{2} = 0.95)

length

integer: length of a measurement period for slope calculations (in seconds; by default - full length)

n.slope

integer: the number of extracted slopes, only one slope is calculated for each measurement phase (used in the methods "min" and "max"; by default - all slopes)

percent

integer: percentage of lower or upper tail (used in the methods "lower.tail" and "upper.tail", respectively; by default percent = 10)

p

integer: p-value of quantile used in the method "calcSMR.quant" (by default p = 0.25)

G

integer: G value is used in the method "calcSMR.mlnd" (by default G = 1:4)

Value

The function returns a data frame with the information about extracted slopes. The data frame is used in the functions QC.slope and calculate.MR.

References

  1. Chabot, D., Steffensen, J. F., & Farrell, A. P. (2016). The determination of standard metabolic rate in fishes. Journal of Fish Biology, 88(1), 81-121.

  2. Herrmann, J. P., & Enders, E. C. (2000). Effect of body size on the standard metabolism of horse mackerel. Journal of Fish Biology, 57(3), 746-760.

Examples

# if the data have been already loaded to R,
# skip the first two lines of the code:
data(SMR.clean)
data(AMR.clean)

SMR.slope <- extract.slope(SMR.clean,
                           method = "min",
                           n.slope = 3,
                           r2=0.95,
                           length = 1200)

AMR.slope <- extract.slope(AMR.clean,
                           method = "all",
                           r2=0.95,
                           length = 300)


[Package FishResp version 1.1.1 Index]