# NOT RUN {
#1 Utilisation uistributions of flatback turtles.
data(curtis)
#2 Calculate overlap probability from 1000 random permutation.
overlap <- boot_overlap(curtis, R = 1000, method = "PHR")
#3 Find the minimum sample size required to estimate the general distribution.
a <- asymptote(overlap)
#4 Plot the mean probability and rational function fit relative to the sample sizes.
ggplot(data = overlap$summary)+
geom_point(aes(x = N, y = mu), alpha = 0.5) +
geom_path(data = a$results, aes(x = x, y = ys)) +
geom_vline(xintercept = a$min.n, linetype = 2) +
labs(x = "N", y = "Overlap probability")
# }
Run the code above in your browser using DataLab