Title: | Environmental Inequality Indices Based on Segregation Measures |
---|---|
Description: | A set of segregation-based indices and randomization methods to make robust environmental inequality assessments, as described in Schaeffer and Tivadar (2019) "Measuring Environmental Inequalities: Insights from the Residential Segregation Literature" <doi:10.1016/j.ecolecon.2019.05.009>. |
Authors: | Mihai Tivadar [aut, cre], Yves Schaeffer [aut] |
Maintainer: | Mihai Tivadar <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 1.2 |
Built: | 2024-12-18 06:57:03 UTC |
Source: | CRAN |
Environmental Centralization index compares the spatial distribution of two social groups around a specific environmental (dis-)amenity, located at one or more points.
ECfunc(x, distmin = NULL, dist = NULL, K = NULL, kdist = NULL, spatobj1 = NULL, folder1 = NULL, shape1 = NULL, spatobj2 = NULL, folder2 = NULL, shape2 = NULL)
ECfunc(x, distmin = NULL, dist = NULL, K = NULL, kdist = NULL, spatobj1 = NULL, folder1 = NULL, shape1 = NULL, spatobj2 = NULL, folder2 = NULL, shape2 = NULL)
x |
a matrix with the groups distributions across spatial units |
distmin |
an optional vector with the minimal distance between each spatial unit and all the environmental localisations. If not provided, it will be computed in the function |
dist |
an optional matrix with the distance between all spatial units and environmental localisations. If not provided, it will be computed in the function |
K |
if provided, the version of the index constrained to the K nearest neighbors |
kdist |
if provided, the version of the index constrained to the nearest neighbors within a distance of kdist |
spatobj1 |
polygons spatial objects for population distribution to compute distances matrix (necessary if distance not provided). |
folder1 |
a character vector with the folder (directory) name indicating where the shapefile with geographical info of population distribution is located on the drive (necessary if distance and spatial object are not provided). |
shape1 |
a character vector with the name of the shapefile (without the .shp extension) with geographical info of population distribution |
spatobj2 |
points spatial objects for (dis-)amenity location to compute distances matrix (necessary if distance not provided). |
folder2 |
a character vector with the folder (directory) name indicating where the shapefile with geographical info of (dis-)amenity distribution is located on the drive (necessary if distance and spatial object are not provided). |
shape2 |
a character vector with the name of the shapefile (without the .shp extension) with geographical info of (dis-)amenity spatial location |
The matrix with environmental centralization index values
Schaeffer Y. and Tivadar M. (2019) Measuring Environmental Inequalities: Insights from the Residential Segregation Literature. Ecological Economics, 164, 106329
Tivadar M. (2019) OasisR: An R Package to Bring Some Order to the World of Segregation Measurement. Journal of Statistical Software, 89 (7), pp. 1-39
Duncan O. D. and Duncan B. (1955) Residential Distribution and Occupational Stratification. American Journal of Sociology, 60 (5), pp. 493-503
Folch D.C and Rey S. J (2016) The centralization index: A measure of local spatial segregation. Papers in Regional Science, 95 (3), pp. 555-576
EDfunc
, EnvResampleTest
,
EnvResamplePlot
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 and A2 - two populations distribution and # the amenities are located in the grid center distance <- sf::st_distance(sf::st_centroid(sf::st_as_sf(segdata)), sf::st_centroid(sf::st_union(sf::st_as_sf(segdata)))) ECfunc (segdata@data[,3:4], dist = distance)
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 and A2 - two populations distribution and # the amenities are located in the grid center distance <- sf::st_distance(sf::st_centroid(sf::st_as_sf(segdata)), sf::st_centroid(sf::st_union(sf::st_as_sf(segdata)))) ECfunc (segdata@data[,3:4], dist = distance)
Environmental Dissimilarity index measures the dissimilarity between the distribution of a population group x and the one of an environmental (dis-)amenity a among spatial units. The environmental dissimilarity index has several versions: "standard" aspatial version based on Duncan & Duncan (1955) segregation index; adjusted versions with spatial interactions matrices based on contiguities (Morrill, 1991; Tivadar, 2019), boundaries, or shapes (Wong, 1998; Tivadar, 2019); or defined by the user.
EDfunc(x, a, vers = "standard", w = NULL, ar = NULL, per = NULL, b = NULL, folder = NULL, shape = NULL, spatobj = NULL, queen = TRUE, ptype = "int", K = 1, f = "exp", beta = 1)
EDfunc(x, a, vers = "standard", w = NULL, ar = NULL, per = NULL, b = NULL, folder = NULL, shape = NULL, spatobj = NULL, queen = TRUE, ptype = "int", K = 1, f = "exp", beta = 1)
x |
a vector of the population/group distribution across spatial units |
a |
a vector of the environmental variable spatial distribution |
vers |
the index version: "standard" (by default) for aspatial environmental dissimilarity index (Duncan); "contig" for adjusted index with a contiguity spatial interactions matrix (Morrill); "bound" for adjusted index with a boundaries spatial interactions matrix (Wong); "shape" for adjusted index with a boundaries and shape spatial interactions matrix (Wong); "user" for adjusted index with any user spatial interactions matrix |
w |
an optional spatial weights matrix. If necessary and not provided, it will be computed in the function |
ar |
an optional vector of spatial units area. If necessary and not provided, it will be computed in the function |
per |
an optional vector of spatial units perimeter. If necessary and not provided, it will be computed in the function. |
b |
an optional shared border matrix. If necessary and not provided, it will be computed in the function. |
folder |
a character vector with the folder (directory) name indicating where the shapefile with geographical info is located on the drive if the interactions matrix is computed in the function |
shape |
a character vector with the name of the shapefile (without the .shp extension) |
spatobj |
a spatial object (SpatialPolygonsDataFrame) with geographic information as alternative for the shapefile, if the interactions matrix is computed in the function |
queen |
logical parameter defining criteria used for contiguity matrix computation, TRUE for queen (by default), FALSE for rook |
ptype |
a string variable giving two options for perimeter calculation for Wong's indices: "int" to use only interior borders of spatial units and "all" to use entire borders, including to the exterior of the area |
K |
the order of contiguity matrix if "contig" version is chosen (K = 1 by default) |
f |
spatial decay function of contiguity matrix when K > 1, with f = "exp" (by default) for exponential function of contiguity "distance" exp(beta*(1-k)) |
beta |
spatial decay intensity parameter (equal to 1 by default), used only when the version with contiguity is chosen and K > 1 |
The value of the environmental dissimilarity index
Schaeffer Y. and Tivadar M. (2019) Measuring Environmental Inequalities: Insights from the Residential Segregation Literature. Ecological Economics, 164, 106329
Tivadar M. (2019) OasisR: An R Package to Bring Some Order to the World of Segregation Measurement. Journal of Statistical Software, 89 (7), pp. 1-39
Duncan O. D. and Duncan B. (1955) Residential Distribution and Occupational Stratification. American Journal of Sociology, 60 (5), pp. 493-503
Morrill B. (1991) On the measure of geographic segregation. Geography research forum, 11, pp. 25-36.
Wong D. W. S. (1998) Measuring multiethnic spatial segregation. Urban Geography, 19 (1), pp. 77-87.
ECfunc
, EnvResampleTest
,
EnvResamplePlot
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 - population distribution and A2 - amenity distribution EDfunc (segdata@data$A1, segdata@data$A2) EDfunc (segdata@data$A1, segdata@data$A2, vers = "contig", spatobj =segdata, queen = FALSE) EDfunc (segdata@data$A1, segdata@data$A2, vers = "contig", spatobj =segdata, queen = FALSE, K = 3) EDfunc (segdata@data$A1, segdata@data$A2, vers = "bound", spatobj =segdata) EDfunc (segdata@data$A1, segdata@data$A2, vers = "shape", spatobj =segdata, ptype = 'all')
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 - population distribution and A2 - amenity distribution EDfunc (segdata@data$A1, segdata@data$A2) EDfunc (segdata@data$A1, segdata@data$A2, vers = "contig", spatobj =segdata, queen = FALSE) EDfunc (segdata@data$A1, segdata@data$A2, vers = "contig", spatobj =segdata, queen = FALSE, K = 3) EDfunc (segdata@data$A1, segdata@data$A2, vers = "bound", spatobj =segdata) EDfunc (segdata@data$A1, segdata@data$A2, vers = "shape", spatobj =segdata, ptype = 'all')
Plot of resampling simulations results.
EnvResamplePlot(ResampleTest, var = 1, coldist = "red", colind = "blue", legend = TRUE, legendpos = "top", cex.legend = 1, bty = "o")
EnvResamplePlot(ResampleTest, var = 1, coldist = "red", colind = "blue", legend = TRUE, legendpos = "top", cex.legend = 1, bty = "o")
ResampleTest |
a ResampleTest object produced with ResampleTest function |
var |
the number of the variable to be plot |
coldist |
color used to plot the simulated distribution |
colind |
color used to plot the index |
legend |
logical parameter, to control the legend's plots |
legendpos |
a character string giving the legend's position: 'bottomright', 'bottom', 'bottomleft', 'left', 'topleft', 'top', 'topright', 'right' and 'center'. |
cex.legend |
a numerical value giving the amount by which plotting text and symbols in legend should be magnified relative to the default. |
bty |
a character string which determines the type of box of the legend: 'o' (by default), 'l', '7', 'c', 'u', or ']' |
A plot with resampling theoretical distribution corresponding upper case letter. A value of 'n' suppresses the box.
Schaeffer Y. and Tivadar M. (2019) Measuring Environmental Inequalities: Insights from the Residential Segregation Literature. Ecological Economics, 164, 106329
Tivadar M. (2019) OasisR: An R Package to Bring Some Order to the World of Segregation Measurement. Journal of Statistical Software, 89 (7), pp. 1-39
EDfunc
, ECfunc
,
EnvResampleTest
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 - population distribution and A2 - amenity distribution testoutput <- EnvResampleTest (x = segdata@data$A1, a = segdata@data$A2, spatobj = segdata, fun = "EDfunc", vers = "contig", queen = FALSE) EnvResamplePlot(testoutput)
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 - population distribution and A2 - amenity distribution testoutput <- EnvResampleTest (x = segdata@data$A1, a = segdata@data$A2, spatobj = segdata, fun = "EDfunc", vers = "contig", queen = FALSE) EnvResamplePlot(testoutput)
Resampling tests for environmental inequality indexes.
EnvResampleTest(x, a = NULL, fun, simtype = "MonteCarlo", nsim = NULL, sampleunit = "unit", proba = NULL, perc = c(.05, .95), outl = FALSE, outmeth = "bp", sdtimes = 2, IQRrange = 1.5, spatobj = NULL, folder = NULL, shape = NULL, spatobj1 = NULL, folder1 = NULL, shape1 = NULL, spatobj2 = NULL, folder2 = NULL, shape2 = NULL, distmin = NULL, dist = NULL, K = NULL, kdist = NULL, vers = "standard", w = NULL, b = NULL, ar = NULL, per = NULL, queen = TRUE, ptype = "int", f = "exp", beta = 1)
EnvResampleTest(x, a = NULL, fun, simtype = "MonteCarlo", nsim = NULL, sampleunit = "unit", proba = NULL, perc = c(.05, .95), outl = FALSE, outmeth = "bp", sdtimes = 2, IQRrange = 1.5, spatobj = NULL, folder = NULL, shape = NULL, spatobj1 = NULL, folder1 = NULL, shape1 = NULL, spatobj2 = NULL, folder2 = NULL, shape2 = NULL, distmin = NULL, dist = NULL, K = NULL, kdist = NULL, vers = "standard", w = NULL, b = NULL, ar = NULL, per = NULL, queen = TRUE, ptype = "int", f = "exp", beta = 1)
x |
a vector of the population/group distribution across spatial units for EDfunc or a matrix with the groups distributions across spatial units for ECfunc |
a |
a vector of the environmental variable spatial distribution for EDfunc |
fun |
a character vector with the function to be tested, fun = "EDfunc" or fun = "ECfunc" |
simtype |
a character vector with the type of simulation. If simtype = 'MonteCarlo' (by default), the function produces a randomization test using Monte Carlo simulations. If simtype = 'Jack', the function generates jackknife replications |
nsim |
the number of simulations (equal to the number of observations for jackknife) |
sampleunit |
for jackknife replicant, the resampling is made only on spatial units. For Monte Carlo simulations, the user can choose between "unit" for spatial units resampling and "ind" for population resampling. |
proba |
for Monte Carlo simulations on population, proba is a vector with location probabilities. If proba = NULL, the vector is equiprobable. If outliers are determined with jackknife technique, proba indicates the probability (confidence interval) for scoring tests. |
perc |
percentille values for jackknife simulations |
outl |
logical parameter for jackknife simulations, if TRUE the function provides the outliers obtained by jackknife iterations |
outmeth |
a character vector designing the outliers detection method: outmeth = 'bp' (by default) for boxplot method; outmeth = 'sd' for standard deviation method; outmeth = 'z' for normal scores method; outmeth = 't' for t Student scores method; outmeth = 'chisq' for chi-squared scores method; outmeth = 'mad' for median absolute deviation method. The estimations based on scoring methods are obtained using outliers package |
sdtimes |
multiplication factor of the standard deviation used for outliers detection with jackknife simulations (2 by default) |
IQRrange |
determines the boxplot thresholds (1.5 by default) as multiplication of IQR (Inter Quartile Range) |
spatobj |
a spatial object (SpatialPolygonsDataFrame) for EDfunc geographic functions |
folder |
a character vector with the folder (directory) containing the shapefile for EDfunc |
shape |
a character vector with the name of the shapefile for EDfunc as alternative to spatobj |
spatobj1 |
polygons spatial objects for population distribution to compute distances matrix for ECfunc |
folder1 |
a character vector with the folder (directory) containing the shape1 for ECfunc |
shape1 |
a character vector with the name of the shapefile for ECfunc as alternative to spatobj1 |
spatobj2 |
points spatial objects for (dis-)amenity location to compute distances matrix for ECfunc |
folder2 |
a character vector with the folder (directory) containing the shape2 for ECfunc |
shape2 |
a character vector with the name of the shapefile for ECfunc as alternative to spatobj2 |
distmin |
an optional vector for ECfunc with the minimal distance between each spatial unit and all the environmental localisations |
dist |
an optional matrix for ECfunc with the distance between all spatial units and environmental localisations. |
K |
the order of contiguity matrix if "contig" version of EDfunc is chosen (K = 1 by default) |
kdist |
if provided, the version of the index constrained to the nearest neighbors within a distance of kdist |
vers |
the EDfunc version: "standard" (by default) for aspatial environmental dissimilarity index (Duncan); "contig" for adjusted index with a contiguity spatial interactions matrix (Morrill); "bound" for adjusted index with a boundaries spatial interactions matrix (Wong); "shape" for adjusted index with a boundaries and shape spatial interactions matrix (Wong); "user" for adjusted index with any user spatial interactions matrix |
w |
an optional spatial weights matrix for EDfunc. |
b |
an optional shared border matrix for EDfunc. |
ar |
an optional vector of spatial units area for EDfunc. |
per |
an optional vector of spatial units perimeter for EDfunc. |
queen |
logical parameter for EDfunc defining criteria used for contiguity matrix computation, TRUE for queen (by default), FALSE for rook |
ptype |
a string variable for EDfunc giving two options for perimeter calculation for Wong's indices: "int" to use only interior borders of spatial units and "all" to use entire borders, including to the exterior of the area |
f |
spatial decay function of contiguity matrix for EDfunc when K > 1, with f = "exp" (by default) for exponential function of contiguity "distance" |
beta |
spatial decay intensity parameter for EDfunc (equal to 1 by default), used only when the version with contiguity is chosen and K > 1 |
A list with: - index's name - simulation type - statistics summary of the simulations - simulated index distribution - simulated population distribution - matrix with outliers (jackknife) - list with outliers values (jackknife)
Schaeffer Y. and Tivadar M. (2019) Measuring Environmental Inequalities: Insights from the Residential Segregation Literature. Ecological Economics, 164, 106329
Tivadar M. (2019) OasisR: An R Package to Bring Some Order to the World of Segregation Measurement. Journal of Statistical Software, 89 (7), pp. 1-39
EDfunc
, ECfunc
,
EnvResamplePlot
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 - population distribution and A2 - amenity distribution testoutput <- EnvResampleTest (x = segdata@data$A1, a = segdata@data$A2, spatobj = segdata, fun = "EDfunc", vers = "contig", queen = FALSE) testoutput$Summary hist(testoutput$IndexDist)
data(segdata, package = "OasisR") # segdata - theoretical distributions on a 10x10 grid map # We consider A1 - population distribution and A2 - amenity distribution testoutput <- EnvResampleTest (x = segdata@data$A1, a = segdata@data$A2, spatobj = segdata, fun = "EDfunc", vers = "contig", queen = FALSE) testoutput$Summary hist(testoutput$IndexDist)