3
$\begingroup$

I am trying to implement the log-likelihood expression Eq(7) from the paper, Parameter Estimation for Linear Dynamical Systems (1996).

Re-writing,

For the model,

$h(t) = \mathbf{A^T} h(t-1) + \eta^h(t)$

$v(t) = \mathbf{B^T}h(t) + \eta^v(t)$

$\eta^h(t) = N(0,Q), \eta^v(t) =N(0,R)$

The log likelihood is $Q= - \sum_{t=1}^{} \big(\frac{1}{2}[v(t) - Bh(t))'R^{-1}[v(t)-Bh(t)] \big) - \frac{T}{2} \log |R| - \sum_{t=2}^T \big( \frac{1}{2} [h(t)' - Ah(t-1)]'Q^{-1}[h(t) - Ah(t-1)]\big) - \frac{T-2}{2} \log |Q| -\frac{1}{2} {[h_1 - \pi_1]}' V_1^{-1}[h_1 - \pi_1] - \frac{1}{2} \log |V_1| - \frac{T(p+2) \log 2 \pi}{2}$

where $\pi_1, V$ is the mean and variance of the initial condition of $h$.

Q1: In the paper, I could not see what $p$ and $k$ is. Can somebody show how this likelihood expression is coming from the joint pdf?

Q2: According to theory, the log-likelihood function is maximized at the true parameter values. I implemented this expression using MATLAB and getting a 2by2 matrix

-13.4165 Inf; 

Inf -13.4165.

Will the log-likelihood be negative and the off-diagonals all infinity? What Is the implication of this?

Shall appreciate an intuitive answer for a beginner level. Thank you.

$\endgroup$

1 Answer 1

3
+50
$\begingroup$

Question 1.

The authors do not say what $p$ or $k$ are before introducing them, which is a little cheeky. You have apparently at some point decided that $k=2$ because that is the difference between your equation and theirs. That is doubtless correct. This suggests

a) these are the dimensions of the state and observation vectors, and

b) that it doesn't actually matter what they are because they are constants in the log likelihood function, so they can be left out without changing anything.

Question 2.

Your matrix output indicates a bug in your code because for any data set, the log likelihood function should output one number for any appropriate values of $A$, $B$, $Q$, $R$, $V_1$ and $\pi_1$.

To be honest, and as the authors observe, this is a very terse note on estimation of linear dynamical systems. You might do better looking at their main source, Shumway and Stoffer. The second edition covers this material in chapter 6. Harvey 1990 also covers the same material. And there are many more gentle introductions from an engineering perspective on the web, if those are more helpful.

$\endgroup$
5
  • $\begingroup$ The difference: their equation has final term $-\frac{T(p+k)}{2} \log 2 \pi$. You've set $k$ to 2. But as I said: it doesn't matter. Maximising without this term will give you exactly the same result as maximising with it. $\endgroup$ Commented Mar 16, 2015 at 16:18
  • 1
    $\begingroup$ Re your other question about formulation: There are several equivalent ways to write AR and MA models as state space systems (I think that's the translation of the IIR/FIR terminology, but I'm not signal processing person). This note might be helpful for seeing some of the ways. $\endgroup$ Commented Mar 16, 2015 at 16:21
  • $\begingroup$ I see, still what does $k$ stand for if $k=2$? I had put $k$= 2 just like a guess and $p=2$ for number of lags. Thank you for the link. One last query: Can I use the same analytical expression of EM from the paper for MA and AR models when estimating their parameters? Or will the likelihood expression and hence the maximization change? Thank you for your effort and time. $\endgroup$
    – SKM
    Commented Mar 16, 2015 at 16:26
  • 1
    $\begingroup$ On EM: Basically, yes. Although you'll notice that some 'parameters' won't actually need any updating because they're tied to 0 or to 1. $\endgroup$ Commented Mar 16, 2015 at 16:44
  • 1
    $\begingroup$ Offhand I've no idea what $p$ and $k$ are in the paper. However, what you can easily see, however, is that they are the constant terms derived from logging a Normal distribution. Specifically, the log likelihood of a $k$ dimensional Normal has a constant term $-\frac{k}{2} \log 2\pi$. Now, in the likelihood at each time step there's (say) a $k$-dimensional draw to get the next state and a $p$-dimensional draw to generate an observation. Repeated $T$ times. Summing all those constants up gives $-\frac{(k+p)T}{2} \log 2\pi$. $\endgroup$ Commented Mar 16, 2015 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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