performs the L-method for detection of regime shifts (Lanzante, 1996)
Usage
Lanzante(data, col, time, p = 0.05, merge = FALSE)
Value
If merge = FALSE (default), produces a 2-column table of time (the time value for each regime shift) and p (the p-value for each regime shift). If merge = TRUE, returns the original dataset with an extra p-value column, giving the p-value for each time unit - 0 for non-shift years.
Arguments
data
The dataframe to be used.
col
The column we are measuring change on.
time
The column containing time units (e.g. age of a subsample)
p
The largest p-value you want to check regime shifts for. Defaults to p = 0.05.
merge
Sets the result to be either a regime-shift only table (if FALSE), or an addition to the original table (if TRUE)