powered by
Calculates spatial balance of a sample subject to inclusion probabilities and auxiliary space
sb(p,x,s)
Number, the spatial balance
vector of length N with inclusion probabilities
matrix of (standardized) auxiliary variables of N rows and q columns
the sample, vector of length n
Grafström, A., Lundström, N.L.P. and Schelin, L. (2012). Spatially balanced sampling through the Pivotal method. Biometrics 68(2), 514-520.
if (FALSE) { # check spatial balance set.seed(1234567); N = 500; n = 70; p = rep(n/N,N); X = cbind(runif(N),runif(N)); # select lpm1 sample s = lpm1(p,X); # calculate balance B = sb(p,X,s); }
Run the code above in your browser using DataLab