Skip to contents

Implements Pettitt's non-parametric change-point statistic U_t = sum_i sum_j sign(x_i - x_j) for i <= t < j, then reports the year maximising |U_t| and an approximate p-value. No external change-point dependency is required.

Usage

morie_tps_changepoint_detection(df, year_col = "OCC_YEAR", ds_name = "?")

Arguments

df

A data.frame with one row per incident.

year_col

Year column name.

ds_name

Character label.

Value

A morie_rich_result list with changepoint_year, K_statistic, p_value, pre_mean, post_mean.