MSM.fit: Fitting Univariate Autoregressive Markov Switching Models

MSM.fitR Documentation

Fitting Univariate Autoregressive Markov Switching Models

Description

Fit autoregressive Markov switching models to a univariate time series using the package MSwM.

Usage

MSM.fit(y, p, nregime = 2, include.mean = T, sw = NULL)

Arguments

y

a time series.

p

AR order.

nregime

the number of regimes.

include.mean

a logical value for including constant terms.

sw

logical values for whether coefficients are switching. The length of sw has to be equal to the number of coefficients in the model plus include.mean.

Value

MSM.fit returns an object of class codeMSM.lm or MSM.glm, depending on the input model.


NTS documentation built on Sept. 25, 2023, 1:08 a.m.

Related to MSM.fit in NTS...