Skip to contents

Treats 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.

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, n_steps_tail, min_step_km, hill_alpha.

Examples

if (FALSE) {
  tps <- read.csv("Assault_Open_Data.csv")
  mrm_tps_levy_scaling(tps)
}