I am completely new to HMM's and state space models, so I have a naive question. I have a classic state space model:

$$ x_t = Ax_{t-1} + w_t \\ y_t = Cx_t + v_t $$

where both x and y are continuous variables.

Let's suppose I figured out the model parameters. How do I use this model to predict the system's behavior into the future? The best I could figure was that I'd do a grid search over a bunch of possible y's and see which one(s) maximize the log likelihood but I am not sure if that's correct. Could you help?

  • $\begingroup$ By "already have the model parameters" do you mean that you already have the state vector at time $t$? $\endgroup$ – Glen_b May 12 '16 at 2:13
  • $\begingroup$ I mean that the calculation converged on my training data, so I have A and C. $\endgroup$ – user3490622 May 12 '16 at 2:19
  • $\begingroup$ You're being overly cryptic. What are the model parameters in your case? The state? Or A and C? Note that in the KF A and C are assumed to be known, not estimated. Please explain what you're doing more clearly. $\endgroup$ – Glen_b May 12 '16 at 2:22

It is fairly simple. If you want predictions of $x$ and $y$ for time $T+h$, you can simply use \begin{align} \hat x_{T+h|T}&=A^h\hat x_{T|T}\\ \hat y_{T+h|T}&=C\hat x_{T+h|T} \end{align} where $\hat x_{T|T}$ is the filtered (or smoothed, it's the same in this case) estimate of the latent variable. You'll find more details in Chapter 13.3 of Hamilton (1994) Time Series Analysis.

This assumes that $A$ and $C$ are known, or at least that you have some estimates. They are likely unknown, so in a first step you'd need to estimate them by e.g. maximizing the likelihood. Then, just use your estimated $A$ and $C$ in the equations above.

| cite | improve this answer | |
  • $\begingroup$ This makes a lot of sense, thanks hejseb! Would you happen to know of any easy-to-use software package that could do that? $\endgroup$ – user3490622 May 12 '16 at 14:55
  • $\begingroup$ @user3490622 You can easily do this in Matlab, R, Python, etc. $\endgroup$ – hejseb May 13 '16 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.