Skip to contents

Disparities

Veil of darkness, odds ratios and risks, the outcome test, benchmarks and dyadic rates.

vodtst()
Veil-of-darkness test
orrisk()
Risks behind an odds ratio
outtst()
Outcome test
dspbm()
Benchmark decomposition of a disparity
dyadrt()
Dyadic offending rates

Forensics

DNA match statistics, the weight and calibration of likelihood ratios, kinship, paternity, mixtures and database searches.

gtmp()
Genotype match probability
lrpost()
Posterior probability from a likelihood ratio
cllr()
Log-likelihood-ratio cost
cllrmin()
Log-likelihood-ratio cost after recalibration
lrcal()
Calibrated likelihood ratios
tipplt()
Tippett plot
eceplt()
Empirical cross-entropy plot
mixlr()
Mixture likelihood ratio
kinidx()
Kinship index
patidx()
Paternity index
dbsrch()
Database search

Policing

Clearance rates, exposure proxies, misrecorded groups and regression to the mean.

clrsmp()
Clearance-rate decomposition and Simpson's paradox
expbnd()
Rates and disparities when exposure is measured by a proxy
misrd()
Risk difference when group membership is misrecorded
rtmhs()
Regression to the mean at selected hot spots

Corrections

Incapacitation, release rules, time in custody, sentence effects and hazards after selection.

incap()
Incapacitation: crime rate, share prevented and the marginal year
incapr()
Incapacitation under desistance and replacement
sellab()
Evaluating a release rule from the released alone
losbnd()
Mean time in custody from completed and current stays
sntbnd()
Bounds on a sentence's effect without assumptions
hzdsel()
Period-two hazards after selective depletion

Networks

Co-offending graphs, centrality, cores, components, communities, brokerage and the Cheeger bounds.

coofg()
Co-offending graph from an incident table
ntdeg()
Degree and strength of each node
ntbtw()
Betweenness of each node
ntcls()
Closeness of each node
ntevc()
Eigenvector centrality of each node
ntcore()
k-core of each node
ntcmp()
Connected components
ntlvn()
Communities by the Louvain method
ntmod()
Modularity of a partition
ntbrk()
Brokerage roles
ntchg()
Cheeger bounds on a network's bottleneck

Spatial

Distances and projection, centrography, nearest neighbours and K functions, hot spots, space-time tests and journey to crime.

hvdist()
Great-circle distance
eqproj() eqinv()
Equal-area projection of longitude and latitude, and its inverse
cgstat()
Mean centre and dispersion of points
cgmedn()
Median centre of points
webpt()
Centre of minimum distance
sdell()
Standard deviational ellipse
cvhull()
Convex hull of points
nnidx()
Nearest-neighbour index
ripk()
Ripley's K function
ripenv()
Envelopes of Ripley's L function and a test of complete spatial randomness
fzmode()
Fuzzy mode
kmpart()
K-means partition of points
nnhclu()
Nearest-neighbour hierarchical clustering
stacel()
Search-circle hot-spot areas
rnnhcl()
Risk-adjusted nearest-neighbour hierarchical clustering
hdbang()
Head-bang smoothing
crwalk()
Correlated random walk of a series of events
mantst()
Mantel's space-time test
stmavg()
Spatial-temporal moving average
jtdecay()
Distance-decay functions for journey to crime
jtsurf()
Journey-to-crime surface
jtcal()
Empirical distance decay from solved trips
jtacc()
Accuracy of a journey-to-crime surface on a solved series
bjtc()
Bayesian journey to crime
spwt()
Spatial weights
gearc()
Geary's C
gorg()
The general G of Getis and Ord
lmorn()
Local Moran (LISA)
locgi()
Local G and G* of Getis and Ord
dirmn()
Directional mean and circular variance

Dossier methods

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.

fair()
Fairness metrics of a binary risk tool by group
tlvc() tlvlr()
Two-level model for multivariate trace evidence
aorwt()
Aoristic weights
bdig() bnft()
Benford digit screens
skp()
Scott-Knott grouping of measurements
rptc()
Constant reporters of a reporting panel
rswp() rshl()
Rosenbaum sensitivity bounds for matched pairs
zgll() zgem()
Group-based trajectory model for counts
mvtll() mvtem()
Group-based multivariate trajectories
tfrp()
Glass fragments recovered under transfer and persistence
lwss()
Lowess smoothing
chmb()
The Chumbley score for two tool-mark profiles
gstr()
Local Getis-Ord Gi* on a grid of counts
sptst()
Andresen's spatial point pattern test

Checks

Which labelling of a table reproduces a reported contrast, and an audit of categorical inputs.

relchk()
Which labelling reproduces a reported contrast?
catchk()
Audit categorical inputs before an analysis

Counts, rates and tables

Rate ratios from count regression with exposure and clusters; rates and proportions by group with exact and approximate intervals; direct and indirect standardisation; cross-tabulation with tests and measures of association.

cntreg()
Count regression: rate ratios between groups
grprr()
Rates and proportions by group: ratios and differences
dastd()
Directly standardised rates
sirex()
Indirect standardisation: standardised ratios with shrinkage
ctabx()
Cross-tabulation with tests and measures of association

Presets

A published dataset’s columns onto a generic function’s arguments.

clprep()
Presets: a published dataset's columns onto a generic function's arguments

Learning

The elastic net with cross-validation, logistic regression and random forests; the learners of the cross-fitted estimators.

enpath()
Elastic net by coordinate descent, with cross-validation
lgtreg()
Logistic regression
rfor()
Random forest for regression and probabilities

Causal estimates

Double machine learning by cross-fitting, with the learners above; augmented inverse probability weighting and targeted maximum likelihood from the same nuisances.

dmlx()
Double machine learning by cross-fitting

Proofs

proof()
Machine-checked proofs behind the package

Package

crimlab crimlab-package
crimlab: Criminology and Sociolegal Statistics