Inspired by the `boot` function in the bootstrap package with clusters + half-sampling added. A future TODO could be to add parallel (not necessarily worth it) https://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf
boot_grf(data, statistic, R, clusters, half.sample = TRUE, ...)
A list with the original estimate t0, and bootstrap estimates t.
A data frame with the original data.
A function computing estimate(s) with signature (data, indices, ...) where data is the original data, and indices a vector which defines the bootstrap sample.
The number of bootstrap replications.
Integer vector of cluster assignment, setting to 1:N corresponds to an ordinary unclustered bootstrap.
Whether to do half sample bootstrap (half the clusters are drawn). Default is TRUE.
Additional arguments passed on to statistic.
Angelo Canty and Brian Ripley (2021). boot: Bootstrap R (S-Plus) Functions.