If merge = FALSE (default), produces a 2-column table of time (the time value for each regime shift) and RSI (the regime shift index for each regime shift). If merge = TRUE, returns the original dataset with an extra RSI column, giving the regime shift index 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)
l
The cut-off length of a regime; affects sensitivity (see Rodionov, 2004)
prob
The p-value for significance of a regime shift. Defaults to p = 0.05.
startrow
What row the analysis starts at. Defaults to 1.
merge
Sets the result to be either a regime-shift only table (if FALSE), or an addition to the original table (if TRUE)