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().
Parameters
Section titled “Parameters”dTrip lengths: numbers from 0.
tThe distances to evaluate at (from 0 when
refl = TRUE).hThe bandwidth: one positive number.
wNULLfor equal weights, or one weight from 0 per trip, with a positive sum.kernThe kernel:
"normal","quartic","triangular","uniform"or"laplace"(double exponential).reflTRUEto reflect at 0.
Returns
Section titled “Returns”A numeric vector of densities, one per value of t.
References
Section titled “References”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
Examples
Section titled “Examples”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.