argrid_MSARmdl: Autoregressive moment grid

View source: R/helperfuncs.R

argrid_MSARmdlR Documentation

Autoregressive moment grid

Description

This function creates a grid of mean and variance consistent with a Markov-switching autoregressive model.

Usage

argrid_MSARmdl(mu, sig, k, ar, msmu, msvar)

Arguments

mu

vector (k x 1) of mu in each regime.

sig

vector (k x 1) of sigma in each regime.

k

integer determining the number of regimes.

ar

number of autoregressive lags.

msmu

Boolean indicator. If TRUE mean is subject to change. If FALSE mean is constant across regimes.

msvar

Boolean indicator. If TRUE variance is subject to change. If FALSE variance is constant across regimes.

Value

List with (M x ar+1) matrix of means for each regime M (where M = k^(ar+1)) and each time t,... t-ar, vector with variance for each regime M, and vector indicating the corresponded 1,..., k regime.


roga11/MSTest documentation built on Feb. 25, 2025, 6:10 p.m.