Skip to content

dspbm

Benchmark decomposition of a disparity

dspbm(pop, contact, force, ref = 1)

Splits each group’s disparity in force per resident, against a reference group, into a disparity in contact per resident times a disparity in force per contact. The split is a product, never a sum. See proof("dspbm").

pop

Residents by group: positive numbers, as a numeric vector, a 1-d table, a list of single numbers or a one-row data frame.

contact

Police contacts by group: positive numbers, in the forms of pop; named inputs are matched to pop by name, unnamed ones by position (only names protect against a mismatch).

force

Uses of force by group: positive numbers, in the forms of pop, matched by name.

ref

The reference group, by name (matched exactly, case included; a factor by its label) or by position in pop as given.

A data frame with one row per group, in the order of pop: group, ref (TRUE for the reference group), cd (contact per resident), fd (force per contact) and rd (force per resident), each against the reference group, with rd = cd * fd.

dspbm(pop = c(a = 9000, b = 1000), contact = c(a = 900, b = 300),
force = c(a = 9, b = 6))

Generated from the R help page: dspbm in the R reference.