Lanzante {rshift} | R Documentation |
Lanzante L-test
Description
performs the L-method for detection of regime shifts (Lanzante, 1996)
Usage
Lanzante(data, col, time, p = 0.05, merge = FALSE)
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) |
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.
Examples
Lanzante(lake_data, "DCA1", "Age")
Lanzante(lake_data, "DCA1", "Age", p=0.10, merge=TRUE)
[Package rshift version 3.0.0 Index]