Skip to content

jtcal

Empirical distance decay from solved trips

jtcal(d, t, h, w = NULL, kern = "normal", refl = TRUE)

A kernel density estimate of trip lengths from known offender trips, to calibrate a decay function (Levine 2009; Silverman 1986). With refl = TRUE the kernels are reflected at 0, so no mass falls below 0 and the estimate integrates to 1 over [0, Inf). Tabulated at evenly spaced distances it is a "table" decay for jtdecay() and jtsurf().

d

Trip lengths: numbers from 0.

t

The distances to evaluate at (from 0 when refl = TRUE).

h

The bandwidth: one positive number.

w

NULL for equal weights, or one weight from 0 per trip, with a positive sum.

kern

The kernel: "normal", "quartic", "triangular", "uniform" or "laplace" (double exponential).

refl

TRUE to reflect at 0.

A numeric vector of densities, one per value of t.

Silverman, B. W. (1986). Density Estimation for Statistics and Data Analysis. Chapman and Hall. doi:10.1201/9781315140919

Levine, N. (2009). Introduction to the special issue on Bayesian journey-to-crime modelling. Journal of Investigative Psychology and Offender Profiling, 6(3), 167-185. doi:10.1002/jip.107

set.seed(1)
trips <- rexp(200, 1 / 2)
jtcal(trips, t = seq(0, 10, 0.5), h = 0.5)

Generated from the R help page: jtcal in the R reference.