Description Usage Arguments Details Value See Also Examples

fitPWRFisher is used to fit a Piecewise Regression (PWR) model by maximum-likelihood via an optimized dynamic programming algorithm. The estimation performed by the dynamic programming algorithm provides an optimal segmentation of the time series.

1 | ```
fitPWRFisher(X, Y, K, p = 3)
``` |

`X` |
Numeric vector of length |

`Y` |
Numeric vector of length |

`K` |
The number of regimes/segments (PWR components). |

`p` |
Optional. The order of the polynomial regression. By default, |

fitPWRFisher function implements an optimized dynamic programming
algorithm of the PWR model. This function starts with the calculation of
the "cost matrix" then it estimates the transition points given `K`

the
number of regimes thanks to the method `computeDynamicProgram`

(method of
the class ParamPWR).

fitPWRFisher returns an object of class ModelPWR.

ModelPWR, ParamPWR, StatPWR

1 2 3 4 5 6 7 | ```
data(univtoydataset)
pwr <- fitPWRFisher(univtoydataset$x, univtoydataset$y, K = 5, p = 1)
pwr$summary()
pwr$plot()
``` |

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.