A sampling method for bootstrap test with spatial data using distance bisquare kernel.
sample_spat(D,h,focal='median')
A square matrix of distance.
A distance bandwidth.
If focal is NULL, the ith residuals can not be selected for the ith observation, if focal=='median' it could be selected with a probability equals to the median probability of neighbors.
a vector of bootstrapped index