rptc
Constant reporters of a reporting panel
rptc(unit, year, rep, y0, y1, minrep = 12)The units (agencies reporting to a national crime statistics programme,
say) that report at least minrep months in every year from y0 to
y1. A year without a record of the unit, or with too few months,
disqualifies it, whatever other units do that year. Counts over time are
comparable only on such a constant panel; a trend from all reporters
mixes change in crime with change in who reports.
Parameters
Section titled “Parameters”unitThe unit of each record: labels, no missing values.
yearThe year of each record: whole numbers.
repThe months reported in each record: whole numbers.
y0, y1The first and last years,
y0 <= y1, from 0.minrepThe fewest months that count as reporting: a whole number from 0.
Returns
Section titled “Returns”A data frame with one row per unit (sorted): unit and const
(TRUE for a constant reporter).
References
Section titled “References”Maltz, M. D. (1999). Bridging Gaps in Police Crime Data. Bureau of Justice Statistics, NCJ 176365.
Examples
Section titled “Examples”rptc(unit = c("a", "a", "b", "b", "b"), year = c(2020, 2021, 2020, 2021, 2021), rep = c(12, 12, 12, 6, 12), y0 = 2020, y1 = 2021)Generated from the R help page: rptc in the R reference.