Description Usage Arguments Examples

Fit models with differing numbers of regimes to trend data

1 2 3 4 5 6 7 8 9 | ```
fit_regimes(
y,
sds = NULL,
n_regimes = 2,
iter = 2000,
thin = 1,
chains = 1,
...
)
``` |

`y` |
Data, time series or trend from fitted DFA model. |

`sds` |
Optional time series of standard deviations of estimates.
If passed in, residual variance not estimated. Defaults to |

`n_regimes` |
Number of regimes to evaluate, defaults 2 |

`iter` |
MCMC iterations, defaults to 2000. |

`thin` |
MCMC thinning rate, defaults to 1. |

`chains` |
MCMC chains, defaults to 1 (note that running multiple chains may result in a label switching problem where the regimes are identified with different IDs across chains). |

`...` |
Other parameters to pass to |

1 2 | ```
data(Nile)
fit_regimes(log(Nile), iter = 50, n_regimes = 1)
``` |

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.