stratify-methods {spcosa}R Documentation

Stratification

Description

Methods for partitioning a spatial object into compact strata by means of k-means. The objective function to minimize is the mean squared shortest distance (MSSD). Optionally, the strata may be forced to be of equal size. This facilitates field work in case of stratified simple random sampling for composites. Another option is spatial infill sampling, a variant of spatial coverage sampling where existing sampling points are taken into account. Use nTry > 1, to reduce the risk of ending up in an unfavorable local optimum.

Usage

## S4 method for signature 'SpatialPixels':
stratify(object, nStrata, priorPoints = NULL, maxIterations = 1000, nTry = 1,
    equalArea = FALSE, verbose = getOption("verbose"))
## S4 method for signature 'SpatialPolygons':
stratify(object, nStrata, priorPoints = NULL, maxIterations = 1000, nTry = 1,
    nGridCells = 2500, equalArea = FALSE, verbose = getOption("verbose"))

Arguments

object an object of class "SpatialPixels" or "SpatialPolygons"
nStrata number of strata (nStrata >= 1).
priorPoints object of class "SpatialPoints", containing the prior (i.e., existing) points
maxIterations maximum number of iterations.
nTry the stratify method will try nTry initial configurations and will keep the best solution in order to reduce the risk of ending up with an unfavorable solution.
nGridCells in case object is an instance of class "SpatialPolygons", the approximate number of grid cells to be used for discretizing the vector map in object.
equalArea If FALSE the algorithm results in compact strata. If TRUE, the algorithm results in compact strata of equal size.
verbose if TRUE, progress information and intermediate results will be printed to the output device.

Methods

object = "SpatialPixels"
Stratify a raster representation of the study area.
object = "SpatialPolygons"
Stratify a vector representation of the study area.

Note

The stratify method may raise an error when the projection attributes ("CRS") have been set. A solution is to remove these attributes by calling the following function from the sp-package: proj4string(myMap) <- NA_character_, where myMap is the map to be stratified.

References

Brus, D. J., Spatjens, L. E. E. M., and de Gruijter, J. J. (1999). A sampling scheme for estimating the mean extractable phosphorus concentration of fields for environmental regulation. Geoderma 89:129-148

de Gruijter, J. J., Brus, D. J., Bierkens, M. F. P., and Knotters, M. (2006) Sampling for Natural Resource Monitoring Berlin: Springer-Verlag.

Examples

## Not run: 

# read a vector representation of the `Farmsum' field (by means of rgdal-package)
shpFarmsum <- readOGR(dsn = system.file("maps", package = "spcosa"), layer = "farmsum")

# stratify `Farmsum' into 50 strata
myStratification <- stratify(shpFarmsum, nStrata = 50)

# plot the resulting stratification
plot(myStratification)

## End(Not run)

[Package spcosa version 0.1-5 Index]