if (FALSE) {
#1 Utilisation uistributions of flatback turtles (n = 15).
data(ud_matrix)
#2 Calculate overlap probability from 2000 random permutation.
overlap <- boot_overlap(ud_matrix, R = 2000, method = "PHR")
#3 Find the minimum sample size required to estimate the general distribution.
a <- asymptote(overlap, upper.degree = 10, estimator = 'glm', family = binomial)
#4 Plot the mean probability and rational function fit relative to the sample sizes.
ggplot(data = a$results, aes(x = x))+
geom_pointrange(aes(y = y, ymin = y_lwr, ymax = y_upr)) +
geom_hline(yintercept = a$h.asymptote*0.95, linetype = 2) +
scale_x_continuous(breaks = seq(0, 15, 3), limits = c(2,15), name = "Animals tracked (n)") +
scale_y_continuous(limits = c(0.5,1), name = "Overlap probability")
}
Run the code above in your browser using DataLab