victim_lorenz: Lorenz curves for victimisation distributions

Description Usage Arguments Examples

View source: R/victim_lorenz.R

Description

A wrapper for a series of functions to generate Lorenz plots from vectors of counts of victimisation incidents. Includes option to include Expected counts under Poisson or Negative Binomial expected counts.

Usage

1
2
victim_lorenz(x, data = NULL, family = c("none", "poisson", "nbinom"),
  reps = 500, by_var = NULL)

Arguments

x

a vector of counts or the name of a column of counts in data

data

a data frame

family

an option based on gini_test that adds curves for the expected counts under the null hypothesis of a poisson or a negative binomial distribution using an aggregate Monte Carlo simulation with 500 replicates

reps

passes option of replicates to gini_test

by_var

the name of a factor variable in the data frame

Examples

1
victim_lorenz("bribes", data = testdata, family = "poisson")

prestevez/estevez documentation built on Jan. 31, 2020, 12:31 a.m.