
Levy-flight Hill-MLE exponent on TPS inter-incident step lengths
Source:R/mrm_tps.R
mrm_tps_levy_scaling.RdTreats consecutive events in chronological order as a single stream
and computes the inter-event step length (km) via haversine on
WGS84 latitude/longitude. Returns the Hill-MLE exponent restricted
to steps above min_step_km.
Events at the TPS unknown-location placeholder (0, 0), with missing
coordinates, or outside the Toronto bounding box (latitude 43.55 to
43.90, longitude -79.65 to -79.10) are dropped first.
Usage
mrm_tps_levy_scaling(
data,
date_col = "OCC_DATE",
lat_col = "LAT_WGS84",
lon_col = "LONG_WGS84",
min_step_km = 0.5,
x_min = NULL
)Arguments
- data
A data.frame with at least the columns named in
date_col,lat_col,lon_col.- date_col
Column name of the date / timestamp (default
"OCC_DATE").- lat_col
Column name of WGS84 latitude (default
"LAT_WGS84").- lon_col
Column name of WGS84 longitude (default
"LONG_WGS84").- min_step_km
Lower-tail cutoff in km (default
0.5).- x_min
Hill-MLE cutoff (default =
min_step_km).
Value
A list with n_events (events used), n_dropped_coords
(events dropped for an unusable location), n_steps_tail,
min_step_km, hill_alpha.
Examples
if (FALSE) {
tps <- read.csv("Assault_Open_Data.csv")
mrm_tps_levy_scaling(tps)
}