asymptote: Horizontal asymptotes of rational functions In SDLfilter: Filtering and Assessing the Sample Size of Tracking Data

Description

Function to find horizontal asymptotes of a rational function.

Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```asymptote( data = NULL, x = NULL, y = NULL, degree = "optim", upper.degree = 10, d1 = NA, d2 = NA, threshold = 0.95, proportional = TRUE, max.asymptote = 1 ) ```

Arguments

 `data` An output object from `boot_overlap` or `boot_area`. `x, y` Numeric vectors of independent (x) and dependent (y) variables. These parameters will be ignored if data is supplied. `degree` The default 'optim' option selects the maximal degree of numerator and denominator of a rational function that minimises the mean squared error. Alternatively, an integer can be used to specify the maximal degree. The 'optim' option is recommended unless there is a strong reason that a maximal degree should be specified. `upper.degree` The upper limit of the maximal degree to be assessed when the 'optim' option is selected. Default is 2, meaning the "optimal" degree is searched from 1 and 2. The default usually gives good results. If the fit does not look good, a larger value may result in a better fit. `d1, d2` (Deprecated) Maximal degrees of numerator (d1) and denominator (d2) of a rational function. d1 and d2 must be equal. Use degree instead. `threshold` Threshold value for considering an asymptote. Once the y value reaches the threshold, it is considered that an asymptote is reached. `proportional` If TRUE (default), a threshold is calculated as estimated asymptote * threshold. If FALSE, the value specified in threshold is used in the analysis. `max.asymptote` The maximum limit of an expected asymptote. Default is 1 (i.e. maximum probability).

Details

This function fits a rational function to the input data. When an output object from `boot_overlap` or `boot_area` is supplied, a rational function is fit to the means of the bootstrap results (e.g. mean overlap probability) as a function of x (e.g. sample size). It then estimates horizontal asymptotes and identifies the sample size when an asymptote is considered. Please caution when estimated horizontal asymptote is very different from the expected asymptote. For example, the estimated horizontal asymptote should be around 1 if overlaps between UDs are calculated using the "PHR" method. see `boot_overlap`.

Value

A list containing a data frame (rational function fit associated with x values), an estimated horizontal asymptote, the minimum sample size if an asymptote is reached, and the estimated optimal degree of numerator and denominator of the rational function.

References

Shimada T, Thums M, Hamann M, Limpus CJ, Hays GC, FitzSimmons N, Wildermann NE, Duarte CD, Meekan MG (2021) Optimising sample sizes for animal distribution analysis using tracking data. Methods in Ecology and Evolution 12(2):288-297 doi: 10.1111/2041-210X.13506

Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery (2007). Numerical Recipes: The Art of Numerical Computing. Third Edition, Cambridge University Press, New York.

`boot_overlap`, `boot_area`