dfmMS: Dynamic factor model with Markov-switching states

Description Usage Arguments Details

View source: R/dfmMS.R

Description

This function extends in a sense dfm in that it allows observation or transition matrices to follow a Markov-switching process, so that they are state-dependent.

Usage

1
2
dfmMS(data, nf = 1, ns = 2, x0 = rep(0, nf), P0 = diag(1, nf), init,
  ...)

Arguments

data

Data matrix

nf

Number of factors

ns

Number of states

x0

Initial value for state vector

P0

Initial value for state covariance, i.e. uncertainty of the initial state value vector

init

List with initial values for A, F, R, p. If not supplied, dfm function will be run and the estimates will be used as initial values.

Details

Note that this method does not implement Chang-Jin Kim algorithm. It is based on the same idea as the dfm function with the adaptation that Kalman filter is replaced by Kim filter which is able to deal with multiple states. Optimization is done over a list of parameters by a simple call to optim instead of an EM-algorithm.

Currently, state equation covariance matrix is restricted to identity.


SebKrantz/dynfacto_R documentation built on Dec. 31, 2020, 4:30 p.m.