Description Usage Arguments Value Author(s) Examples

View source: R/computeBreakPoints.R

Find structural breaks by fitting it rectangles to a time series. The algorithm is randomised; it uses a genetic algorithm. Therefore, the break point sequence found can be different in different executions of the method on the same data, especially when used on longer series of some thousand observations.

1 | ```
computeBreakPoints(series,alpha)
``` |

`series` |
The time series as a vector of doubles. |

`alpha` |
A double in the range |

The break points found as a vector of integers. The first entry always is 0 (the first index of the series) the last one is the length of the series (note, indexing starts with 0). The other entries are the indices of the internal break points.

Paul Fischer and Astrid Hilbert

1 2 3 4 | ```
series <- c(1,2,1,2,1,2,5,6,5,6,5,6)
alpha <- 0.25
breaks <- computeBreakPoints(series,alpha)
breaks
``` |

```
Loading required package: rJava
[1] 0 6 12
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.