Description Usage Arguments Details Value Author(s) Examples
bbturns
returns turns information of a time series, selected by B-B algorithm.
1 2 | bbturns(x, neighbour = 5, mincycle = 15, phase = 5, extr_limit = 3.5,
end_num = 6, mcd_gap = 8)
|
x |
a numeric vector. |
neighbour |
find local extreme within +/- neighbour. |
mincycle |
numeric, one cycle must have at least |
phase |
numeric, a phase of one cycle must have length of |
extr_limit |
numeric, some values will be regarded as extreme who out range of +/- extr_limit standard deviation of ratio of irregular and original series. |
end_num |
peak or trough should be apart form either end of series by at least |
mcd_gap |
max gap for calculate ratio when getting MCD value, default is 8. |
B-B algorithm proposed by Gerhard Bry and Charlotte Boschan in 1971, see http://papers.nber.org/books/bry_71-1.
isturn
a vector stores turns information of series. 1 means it is a peak turn, -1 means it is trough turn, 0 means neither peak nor trough.
isturn_old
a vector stores turns information for last setup.
peaktrough_idx
stores index of peak or trough turns of original series.
peak_idx
peak index.
trough_idx
trough index.
Hejun Liu, Beijing liuhejunlj@163.com
1 2 | data(importexport)
bbturns(importexport$ImEx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.