LDS_EM: Learn LDS model

Description Usage Arguments Value Note

View source: R/RcppExports.R

Description

Estimate the hidden state and model parameters given observations and exogenous inputs using the EM algorithm. This is the key backend routine of this package.

Usage

1
LDS_EM(y, u, v, theta0, niter = 1000L, tol = 1e-05)

Arguments

y

Observation matrix (may need to be normalized and centered before hand) (q rows, T columns)

u

Input matrix for the state equation (m_u rows, T columns)

v

Input matrix for the output equation (m_v rows, T columns)

theta0

A vector of initial values for the parameters

niter

Maximum number of iterations, default 1000

tol

Tolerance for likelihood convergence, default 1e-5. Note that the log-likelihood is normalized

Value

A list of model results

Note

This code only works on one dimensional state and output at the moment. Therefore, transposing is skipped, and matrix inversion is treated as /, and log(det(Sigma)) is treated as log(Sigma).


ntthung/ldsr documentation built on Aug. 28, 2020, 2:34 a.m.