Sample from a multivariate normal distribution to create "in-contact" n point pairs based on real-time-location systems accuracy, and generate a distribution describing observed distances between point ppairs.
findDistThresh(
n = 1000,
acc.Dist1 = 0.5,
acc.Dist2 = NULL,
pWithin1 = 90,
pWithin2 = NULL,
spTh = 0.666
)
Integer. Number of "in-contact" point-pairs used in the expected-distance distribution(s). Defaults to 1000.
Numerical. Accuracy distance for point 1.
Numerical. Accuracy distance for point 2. If == NULL, defaults to acc.Dist1 value.
Numerical. Percentage of data points within acc.Dist of true locations for point 1.
Numerical. Percentage of data points within acc.Dist of true locations for point 2. If == NULL, defaults to pWithin1 value.
Numerical. Pre-determined distance representing biological threshold for contact.
Output is a named vector with 22 observations describing the mean, max, and upper 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 99-percent CI values, and the true-positive rate (i.e., TPR) calculated from the contact-distance distribution.
This function is for adjusting contact-distance thresholds (spTh) to account for positional accuracy of real-time-location systems, assuming random (non-biased) error in location-fix positions relative to true locations. Essentially this function can be used to determine an adjusted spTh value that likely includes >= 99-percent of true contacts defined using the initial spTh.
Farthing, T.S., Dawson, D.E., Sanderson, M.W., and Lanzas, C. in Press. Accounting for space and uncertainty in real-time-location- system-derived contact networks. Ecology and Evolution.
# NOT RUN {
findDistThresh(n = 10, acc.Dist1 = 0.5, acc.Dist2 = NULL,
pWithin1 = 90, pWithin2 = NULL, spTh = 0.5)
# }
Run the code above in your browser using DataLab