Rodionov {rshift}R Documentation

Rodionov (2004)'s STARS algorithm

Description

performs STARS analysis (Rodionov, 2004) on a dataset

Usage

Rodionov(data, col, time, l, prob = 0.05, startrow = 1, 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)

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)

Value

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.

Examples

Rodionov(lake_data, "DCA1", "Age", l=5)
Rodionov(lake_data, "DCA1", "Age", l=5, prob=0.01, startrow=2, merge=TRUE)

[Package rshift version 3.0.0 Index]