Description Usage Arguments Details Value Author(s) References Examples
Draws a graph that shows the pattern of residential concentration for a population group and calculates its summary statistic as suggested by Hong and Sadahiro (2013).
1 |
data |
an object of class |
grpID |
a numeric value specifying the population group (i.e., column in ‘data’) to be analysed. Multiple values are not allowed. |
n |
a numeric value indicating the number of thresholds to be used. A large value of ‘n’ creates a smoother-looking graph but slows down the calculation speed. |
graph |
logical. If TRUE, draw the concentration profile for the specified population group. |
add |
logical. If TRUE, add the graph to the current plot. |
... |
optional arguments to be passed to |
For ‘n’ equally-spaced thresholds between 0 and 1, conprof
identifies the areas where the selected population group comprises at least the given threshold proportions; computes how many of the group members live in these areas; and plots them on a 2D plane with the threshold values in the horizontal axis and the proportions of the people in the vertical axis.
The summary statistic is calculated by estimating the area between the concentration profile and a hypothetical line that represents a uniform distribution (see the examples).
A list
object with the following three elements:
x |
the threshold values. |
y |
the proportions of the people who live in the areas where they comprise at least the corresponding threshold percentages in the local population composition. |
d |
the summary statistic for the concentration profile. |
Seong-Yun Hong
Poulsen, M., Johnston, R., and Forrest J. (2002) Plural cities and ethnic enclaves: Introducing a measurement procedure for comparative study. International Journal of Urban and Regional Research, 26, 229-243.
Hong, S.-Y. and Sadahiro, Y. (2013) Measuring geographic segregation: A graph-based approach. Journal of Geographical Systems, na, na-na.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | xx <- runif(100) # random distribution
xx <- xx * (4000 / sum(xx))
yy <- rep(c(40, 60), 100) # no segregation
zz <- rep(c(100, 0), c(40, 60)) # complete segregation
set1 <- cbind(xx, 100 - xx)
set2 <- matrix(yy, ncol = 2, byrow = TRUE)
set3 <- cbind(zz, 100 - zz)
par(mar = c(5.1, 4.1, 2.1, 2.1))
out1 <- conprof(set1, grpID = 1,
xlab = "Threshold level (%)",
ylab = "Population proportion (%)",
cex.lab = 0.9, cex.axis = 0.9, lty = "dotted")
out2 <- conprof(set2, grpID = 1, add = TRUE,
lty = "longdash")
out3 <- conprof(set3, grpID = 1, add = TRUE)
title(main = paste("R =", round(out1$d, 2)))
# shaded areas represent the summary statistic value
if (require(graphics)) {
polygon(c(out1$x[1:400], 0.4, 0),
c(out1$y[1:400], 1, 1),
density = 10, angle = 60,
border = "transparent")
polygon(c(out1$x[401:999], 1, 0.4),
c(out1$y[401:999], 0, 0),
density = 10, angle = 60,
border = "transparent")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.