| fg_findTurningPoints | R Documentation |
Event Helpers : fg_findTurningPoints
fg_findTurningPoints(
indta,
rtn = "dates",
method = "pctchg",
npts = 10,
pts_of_interest = "change",
pctabovemin = 0.05,
maxwindow = -1,
addlast = FALSE,
cpmmethod = "GLR",
...
)
indta |
Time series |
rtn |
string with what to return ('dates','data','all') |
method |
string describing method of finding Turning Points
|
npts |
Number of change points to find |
pts_of_interest |
string in 'change' (default) or 'value' |
pctabovemin |
Minimum percentage change to look for. |
maxwindow |
Integer (default -1) which limits (if positive) the minimum number of observations between change points. |
addlast |
Logical (default: FALSE) to add an event with final observation. |
cpmmethod |
String (default: "GLM") passed to |
... |
Additional parameters passed to cpm-package |
data.table suitable for passing into fgts_dygraph() via the event_ds parameter
dta <-eqtypx[,.(date,QQQ,TLT)]
fgts_dygraph(dta,event_ds=fg_findTurningPoints(dta),title="With turningPoints")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.