Description Usage Arguments Value Note
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.
1 | LDS_EM(y, u, v, theta0, niter = 1000L, tol = 1e-05)
|
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 |
A list of model results
theta: model parameters (A, B, C, D, Q, R, mu1, V1) resulted from Mstep
fit: results of Estep
liks : vector of loglikelihood over the iteration steps
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).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.