Learn R Programming

SpotSampling (version 0.1.0)

Spread: Spreading measure of several spatial samples

Description

Measure the spread of several spatial samples depending on inclusion probabilities and spatial coordinates. Two spreading criteria are available: one based on the space partition of Voronoi polygons and one based on Moran's I index (see references).

Usage

Spread(S, pik, coord, criteria)

Arguments

S

a matrix that contains samples in columns. Matrix rows correspond to the units. It could be matrix of temporal samples returned by function Spot.

pik

a matrix of temporal inclusion probabilities. Columns of pik correspond to samples, and rows correspond to the units.

coord

a matrix that contains spatial coordinates in columns. Matrix rows correspond to the units.

criteria

it specifies the criteria used to measure samples spreading. criteria = "IB": the criteria based on Moran's I index is used (see IB), criteria = "sb": the criteria based on Moran's I index is used (see sb).

Value

a vector that contains values of the spreading measure of the samples in columns of S.

References

Grafstrom, A., Lundstrom, N. L. P., and Schelin, L. (2012). Spatially balanced sampling through the pivotal method. Biometrics, 68(2):514-520.

Jauslin, R. and Tille, Y. (2019). Spatial spread sampling using weakly associated vectors. Statistical Office, University of Neuchatel.

See Also

IB, sb.

Examples

Run this code
# NOT RUN {
set.seed(1)
## Coordinates in two dimensions of 10 units ##
coord <- matrix(stats::runif(10*2), ncol=2)
## Temporal inclusion probabilities with 3 waves and 4 units ##
pik <- matrix(rep(0.2,10*3), ncol = 3, byrow = TRUE)
## Spot method to obtain temporal samples ##
S <- Spot(pik, coord)
## Compute IB criteria ##
Spread(S, pik, coord, criteria = 'IB')

# }

Run the code above in your browser using DataLab