CRIMLAB
The numbers will be questioned.
Compute them correctly.
Statistical methods for courts, corrections, policing, forensics and sociolegal research. One compiled core, the same checked answer in every language.
Does darkness change who is stopped?
The veil-of-darkness test compares each group's share of stops when officers can see who they are stopping and when they cannot.
Groups are matched by name, never by position, and every argument is checked twice: in R and again in the compiled kernel.
Which way round is that odds ratio?
A report gives an odds ratio of 0.44 for A against B. Is that A against B, or B against A, for the event or for its absence?
relchk() works out every labelling of the table and says which ones give the number, and whether the claimed one is among them.
Clearance fell for every offence. The total rose.
Aggregate clearance rates move when the mix of offences moves, even if nothing about clearing a case changed.
clrsmp() splits the change into the part from the rates and the part from the mix, and flags the paradox.
A likelihood ratio is not a probability
A match statistic says how much more likely the evidence is under one account than another. It says nothing until it meets a prior.
lrpost() does the step reports skip; the forensic family also covers match probabilities, kinship, mixtures and the calibration of likelihood ratios.
Where it happens
Nearest-neighbour hierarchical clusters, space-time tests, journey to crime, spatial weights and autocorrelation, on planar coordinates or longitude and latitude.
A search priority over a grid is not evidence about any person, and the help pages say so.
One core, every language
The computations run in a compiled C++17 core with a plain C interface. R, Python, Rust, Java, JavaScript and the shell call it and return the same numbers.
The Python package imports nothing outside the standard library.
Proofs you can name
Every method is a published one, cited on its help page. Where an identity or a bound has a machine-checked proof in Lean, proof() names the theorem.
What it computes
Disparities
5 functions: Veil of darkness, odds ratios and risks, the outcome test, benchmarks and dyadic rates.
Forensics
11 functions: DNA match statistics, the weight and calibration of likelihood ratios, kinship, paternity, mixtures and database searches.
Policing
4 functions: Clearance rates, exposure proxies, misrecorded groups and regression to the mean.
Corrections
6 functions: Incapacitation, release rules, time in custody, sentence effects and hazards after selection.
Networks
11 functions: Co-offending graphs, centrality, cores, components, communities, brokerage and the Cheeger bounds.
Spatial
30 functions: Distances and projection, centrography, nearest neighbours and K functions, hot spots, space-time tests and journey to crime.
Dossier methods
14 functions: Fairness of risk tools, trace evidence, aoristic time, Benford screens, glass grouping and transfer, constant reporters, sensitivity bounds, trajectory models, lowess, tool marks, grid Gi* and the point pattern test.
Checks
2 functions: Which labelling of a table reproduces a reported contrast, and an audit of categorical inputs.
Learning
3 functions: The elastic net with cross-validation, logistic regression and random forests; the learners of the cross-fitted estimators.
Causal estimates
1 function: Double machine learning by cross-fitting, with the learners above; augmented inverse probability weighting and targeted maximum likelihood from the same nuisances.
Proofs
1 function: Machine-checked proofs behind the package.
Package
1 function: crimlab: Criminology and Sociolegal Statistics.