sb_vk | R Documentation |
v_k
to compute the Spatial balanceCalculates the v_k
values of the spatial balance developped by Stevens and Olsen (2004) and suggested by Grafström et al. (2012).
sb_vk(pik, X, s)
pik |
vector of the inclusion probabilities. The length should be equal to |
X |
matrix representing the spatial coordinates. |
s |
A vector of size |
The spatial balance measure based on the Voronoï polygons is defined by
B(S) = \frac{1}{n}\sum_{k\in S} (v_k -1)^2 .
The function return the v_k
values and is mainly based on the function sb
of the package BalancedSampling
Grafström and Lisic (2019).
A vector of size N
with elements equal to the v_k
values. If the unit is not selected then the value is equal to 0.
Grafström, A., Lundström, N.L.P. and Schelin, L. (2012). Spatially balanced sampling through the Pivotal method. Biometrics, 68(2), 514-520
Grafström, A., Lisic J. (2019). BalancedSampling: Balanced and Spatially Balanced Sampling. R package version 1.5.5. https://CRAN.R-project.org/package=BalancedSampling
Stevens, D. L. Jr. and Olsen, A. R. (2004). Spatially balanced sampling of natural resources. Journal of the American Statistical Association 99, 262-278
BalancedSampling::sb
N <- 50
n <- 10
X <- as.matrix(cbind(runif(N),runif(N)))
pik <- rep(n/N,N)
s <- wave(X,pik)
v <- sb_vk(pik,X,s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.