isp: Index of Spatial Proximity

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/isp.R

Description

Computes the index of spatial proximity developed by White (1983). This measure estimates the level of clustering by comparing the average distance between members of the same group with that between all individuals (regardless of the groups to which they belong). The results may change drastically depending on the definition of distance.

Usage

1
2
isp(x, data, nb, fun, verbose = FALSE, ...)
whiteseg(x, data, nb, fun, verbose = FALSE, ...)

Arguments

x

a numeric matrix or data frame with coordinates (each row is a point), or an object of class Spatial.

data

an object of class matrix, or one that can be coerced to that class. The number of rows in ‘data’ should equal the number of geographic units in ‘x’, and the number of columns should be greater than one (i.e., at least two population groups are required). This can be missing if ‘x’ has a data frame attached to it.

nb

an optional matrix object indicating the distances between the geographic units.

fun

a function for the calculation of proximity. The function should take a numeric vector as an argument (distance) and return a vector of the same length (proximity). If this is not specified, a negative exponential function is used by default.

verbose

logical. If TRUE, print the current stage of the computation and time spent on each job to the screen.

...

optional arguments to be passed to dist when calculating the distances between the geographic units in ‘x’. Ignored if ‘nb’ is given. See help(dist) for available options.

Details

‘nb’ must be a square matrix (i.e., one that has the same number of rows and columns) but does not have to be symmetric. If ‘nb’ is not given, whiteseg attempts to create a distance matrix of ‘x’ using the function dist in stats and use it as ‘nb’. The optional arguments in ‘...’ will be passed to dist.

Value

A single numeric value indicating the degree of segregation; a value of 1 indicates absence of segregation, and values greater than 1.0 indicate clustering. If the index value is less than one, it indicates an unusual form of segregation (i.e., people live closer to other population groups).

Note

The function name whiteseg() was changed in version 0.4-3 to isp(). The old function name will be deprecated from 0.6-1.

Author(s)

Seong-Yun Hong

References

White, M. J. (1983). The measurement of spatial segregation. The American Journal of Sociology, 88, 1008-1018.

See Also

seg, dist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# uses the idealised landscapes in 'segdata'
data(segdata)
grd <- GridTopology(cellcentre.offset=c(0.5,0.5),
                    cellsize=c(1,1), cells.dim=c(10,10))
grd.sp <- as.SpatialPolygons.GridTopology(grd)

d <- rep(NA, 8) # index of dissimilarity
p <- rep(NA, 8) # index of spatial proximity
for (i in 1:8) {
  idx <- 2 * i
  d[i] <- seg(segdata[,(idx-1):idx])
  p[i] <- whiteseg(grd.sp, data = segdata[,(idx-1):idx])
  full <- segdata[,(idx-1)] == 100
  half <- segdata[,(idx-1)] == 50
  plot(grd.sp)
  plot(grd.sp[full,], col = "Black", add = TRUE)
  if (any(half))
    plot(grd.sp[half,], col = "Grey", add = TRUE)
  text(5, 11.5, labels = 
       paste("D = ", round(d[i], 2), ", P = ", round(p[i], 2), sep = ""))
}

Example output

Loading required package: sp
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.
Note: seg() will be deprecated soon.
Use dissim() instead. See help(dissim) for details.
Note: whiteseg() function name has been changed to isp().
The old name will be deprecated from version 0.6-1.

seg documentation built on Dec. 19, 2019, 1:09 a.m.

Related to isp in seg...