countConsecutive: Count Runs of Observations Satisfying a Condition

Description Usage Arguments Details Value Author(s)

View source: R/countConsecutive.R

Description

Shewhart's rules provide conditions under which a process can be considered to be out of control. countConsecutive generates an index by which runs can be systematically identified and can facilitate identifying these observations on control charts.

Usage

1

Arguments

x

A numeric vector of observations.

condition

An unevaluated logical expression based on x.

maxIndex

Logical. When TRUE, each element is the maximum run length of each unique run. When FALSE, each element is the element's individual run count.

...

Additional arguments to be passed to plyr::ddply (especially for running in parallel).

Details

Shewhart's rules for identifying out of control processes are: \item Any one point is more than three standard units from the central line \item Any two consecutive points are more than two standard units in the same direction from the central line \item A run of ___ consecutive points are more than one standard units in the same direction from the central line \item A run of eight consecutive points are on the same side of the central line.

Value

A vector the length of x giving each elements run length or run count.

Author(s)

Benjamin Nutter


nutterb/Bluegrass documentation built on May 24, 2019, 10:50 a.m.