getIntervalCharacterization: Characterize a given time series' behavior over a given...

Description Usage Arguments Details Value

View source: R/getIntervalCharacterization.r

Description

Determine whether or not a given time series is increasing, decreasing, or constant over a given interval for a specified change threshold

Usage

1
tsData.intervalChar <- getIntervalCharacterization(tsData,startPos,endPos,changeThreshold)

Arguments

tsData

A time series object.

startPos

The index of the first time series element to evaluate.

endPos

The index of the last time series element to evaluate.

changeThreshold

A value between 0 and 1 (inclusive) serving as an upper bound for the percent change you're willing to tolerate from one element to the next.

Details

Most time series are non-constant even over short intervals. Therefore, use the changeThreshold parameter to specify the percent change that can be tolerated before considering a change meaningful. Essentially, specify the percent change you're willing to ignore when characterizing a time series over an interval. If the percent change for each difference is less than or equal to changeThreshold over the specified interval, the time series is considered constant over that interval. Otherwise, the time series is considered either "increasing", "decreasing", or "eventually constant". This will be determined by the magnitude of the percent change between the first and last elements in the interval.

Value

A string characterizing the time series over the given interval for the specified change threshold. The return values are: "INCREASNG","DECREASING", "CONSTANT", "EVENTUALLY CONSTANT"


OHDSI/Castor documentation built on March 20, 2021, 6:09 p.m.