impacts: Impact calculations

Description Usage Arguments Details Value Examples

View source: R/impacts.R

Description

Calculates the total contribution to the index of dissimilarity of neighbourhoods grouped by regions or other higher-level geographies

Usage

1

Arguments

data

a data frame with ncol(data) >= 2. Each row of the data represents a neighbourhood or some other areal unit for which counts of population have been made.

vars

a character or numeric vector of length 2 or 3 giving either the names or columns positions of the variables in data in the following order

  1. the number of population group Y in each neighbourhood

  2. the number of population group X in each neighbourhood

levels

a character or numeric vector of minimum length 1 identifying either the names or columns positions of the variables in data that record to which higher-level grouping each lower-lower level unit belongs

omit

(optional) a character vector containing the names of places to search for in the data and to omit from the calculations

Details

When the index of dissimilarity (ID) is estimated as a regression model the residuals from that model are the differences between the share of population group Y and the share of population group X that are observed in each neighbourhood. The impacts function summaries those differences by higher-level geographies to consider which places or regions have the neighbourhoods that contribute most to the ID. The measures are useful for understanding where the seperations of the two population groups are greatest. However, to look at scale effects, where the effect of each level net of the other levels is wanted, fit a multilevel index using function id.

Value

A list of data.frames, each containing the impact calculations for the higher-level geographies. The variables are

Examples

1
2
3
4
5
6
7
8
9
data(aggdata)
impx <- impacts(aggdata, c("Bangladeshi", "WhiteBrit"), c("LAD","RGN"))
head(impx)
# sorted by impact score
# For $RGN London has the greatest impact on the ID
# The 'excess' share of the Bangladeshi population is not especially
# significant (see scldMean) but there is a lot of variation between
# neighbourhoods (see scldSD)
# For $LAD note the impacts of Tower Hamlets and Newham

MLID documentation built on May 30, 2017, 2:23 a.m.