Unlimited learning, half price | 50% off
Get 50% off unlimited learning

WaveSampling (version 0.1.4)

IB: Spreading measure based on Moran's I index

Description

This function implements the spreading measure based on Moran's I index.

Usage

IB(W, s)

Value

A numeric value that represents the spatial balance. It could be any real value between -1 (spread) and 1 (clustered).

Arguments

W

a stratification matrix inheriting from sparseMatrix that represents the spatial weights. See wpik.

s

a vector of size N with elements equal to 0 or 1. The value 1 indicates that the unit is selected while the value 0 is for non-chosen units.

Details

This index is developped by Tillé et al. (2018) and measure the spreading of a sample drawn from a population. It uses a corrected version of the traditional Moran's I index. Each row of the matrix W should represents a stratum. Each stratum is defined by a particular unit and its neighbouring units. See wpik. The spatial balance measure is equal to

IB=(ss¯w)W(ss¯w)(ss¯w)D(ss¯w)(ss¯w)B(ss¯w),

where D is the diagonal matrix containing the wi,

s¯w=1sW11W1

and

B=WD1WW11W1W1.

To specify the spatial weights uses the argument W.

References

Tillé, Y., Dickson, M.M., Espa, G., and Guiliani, D. (2018). Measuring the spatial balance of a sample: A new measure based on Moran's I index. Spatial Statistics, 23, 182-192.

See Also

wpik

Examples

Run this code
  N <- 36
  n <- 12
  x <- seq(1,sqrt(N),1)
  X <- expand.grid(x,x)
  pik <- rep(n/N,N)
  W <- wpik(as.matrix(X),pik,bound = 1,tore = TRUE,shift = FALSE,toreBound = sqrt(N))
  W <- W - diag(diag(W))
  s <- wave(as.matrix(X),pik,tore = TRUE,shift = TRUE,comment = TRUE)
  IB(W,s)

Run the code above in your browser using DataLab