sus: Create baseline(s) for 'val'.

Description Usage Arguments Details Value See Also Examples

View source: R/sus.R

Description

The first baseline for val is the median of the first 8 useful observations of val. It stretches from the first useful observation to the 8th useful observation and is often black. A second line of the same value is usually extended from the beginning of the black line to the end of val. This second line is for visual comparison later in val and is usually grey.

Usage

1
sus(val, trigger = 9)

Arguments

val

sus() iterates along the elements of val to create baselines.

trigger

Number of data points required to create a sustained shift.

Details

If a sustained shift is detected after the first 8 useful data points, the baseline is redrawn using the first 8 useful observations in the sustained shift. Given a vector val the function sus() returns both the grey and black lines in a data.frame.

Value

A data.frame with two columns: 1. The median of the first n useful observations of a sustained shift (where n defaults to 8) 2: The same as the previous column, but with each median value extended to either the end of val or the beginning of the next sustained shift.

See Also

ticker

Examples

1
runchart:::sus(rep(1:20), trigger = 9)

jsphdms/runchart documentation built on Oct. 21, 2018, 1:19 p.m.