Skip to contents

Computes the Spatial Balance Index (SBI), which is a measure of spatial balance of a sample. The lower it is, the better the spread.

Usage

sbi(dis, pi, s)

Arguments

dis

A distance matrix NxN that specifies how far all the pairs of units in the population are.

pi

A vector of first order inclusion probabilities of the units of the population.

s

A vector of labels of the sample.

Value

Returns the Spatial Balance Index.

Details

The SBI is based on Voronoi polygons. Given a sample s, each unit \(i\) in the sample has its own Voronoi polygon, which is composed by all population units closer to \(i\) than to any other sample unit \(j\). Then, per each Voronoi polygon, define \(v_{i}\) as the sum of the inclusion probabilities of all units in the \(i\)-th Voronoi polygon. Finally, the variance of \(v_{i}\) is the SBI.

References

Stevens DL, Olsen AR (2004). Spatially Balanced Sampling of Natural Resources. Journal of the American Statistical Association, 99(465), 262-278. doi:10.1198/016214504000000250

Examples

# \dontshow{
d <- matrix(runif(200), 100, 2)
dis <- as.matrix(dist(d))
pi <- rep(10 / 100, 100)
s <- sample(1:100,10)
sbi(dis = dis, pi = pi, s = s)
# }
# \donttest{
dis <- as.matrix(dist(cbind(simul1$x, simul1$y))) # distance matrix
con <- rep(0, nrow(dis)) # vector of constraints
stand_dist <- stprod(mat = dis, con = con) # standardized matrix
pi <- rep(100 / nrow(dis), nrow(dis)) # vector of probabilities inclusion
s <- pwd(dis = stand_dist$mat, n = 100)$s # sample
sbi(dis = dis, pi = pi, s = s)
# }