sntbnd
Bounds on a sentence’s effect without assumptions
sntbnd(y, z, treat = NULL, w = NULL)crimlab.sntbnd(y, z, treat=None, w=None)crimlab sntbnd --y VALUE --z VALUE [--treat VALUE] [--w VALUE]Each person receives one of two sentences and shows the outcome (say,
reconviction) under that one only. With no assumption about who receives
which, the chance of the outcome under a sentence is known only up to an
interval whose width is the share who received the other sentence, and
the effect of one sentence against the other lies in an interval of
width exactly 1 that always contains 0: observational data alone cannot
even sign it. See proof("sntbnd").
Parameters
Section titled “Parameters”yOutcomes: 0 or 1 for each person.
zSentences: a vector with exactly two distinct values, same length: character, numbers, logical or a factor (its labels; level order and whether it is ordered are ignored), not dates nor a labelled vector of codes. When
y,z(andw) are all named with unique names, they are matched by name.treatThe value of
ztaken as the treatment, matched exactly.NULLis allowed only where the treatment is explicit inz:TRUEfor a logicalz,1for azof 0 and 1; otherwise it must be given, since a treatment chosen by sorting the values would be arbitrary.wNULLfor equal weights, or one non-negative weight per person with a positive total.
Returns
Section titled “Returns”A data frame with three rows, the comparison sentence, the
treatment and effect (treatment minus comparison): term, share
(the weighted share sentenced; NA for the effect), lower, upper
and observed (the observed rate under each sentence and their
difference).
References
Section titled “References”Manski, C. F. and Nagin, D. S. (1998). Bounding disagreements about treatment effects: a case study of sentencing and recidivism. Sociological Methodology, 28(1), 99-137. doi:10.1111/0081-1750.00043
Examples
Section titled “Examples”set.seed(1)z <- sample(c("community", "custody"), 500, TRUE, c(0.6, 0.4))y <- rbinom(500, 1, ifelse(z == "custody", 0.55, 0.35))sntbnd(y, z, treat = "custody")Generated from the R help page: sntbnd in the R reference.