# How to do predictions using a state-space model

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?

• By "already have the model parameters" do you mean that you already have the state vector at time $t$? – Glen_b May 12 '16 at 2:13
• I mean that the calculation converged on my training data, so I have A and C. – user3490622 May 12 '16 at 2:19
• 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. – 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.