fit_regimes {bayesdfa}R Documentation

Fit models with differing numbers of regimes to trend data

Description

Fit models with differing numbers of regimes to trend data

Usage

fit_regimes(
  y,
  sds = NULL,
  n_regimes = 2,
  iter = 2000,
  thin = 1,
  chains = 1,
  ...
)

Arguments

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 NULL.

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 rstan::sampling().

Examples

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

[Package bayesdfa version 1.1.0 Index]