I am trying to implement Eq(7) given below from Parameter estimation for Linear dynamical system
where Q is a 2 by 2 covariance matrix of the process noise. The model is
x which is a 2 by T dimensional and observation vector is 1 by T dimensional for a state space model:
The state space model :
x(t+1) = Ax(t) + u(t) y(t) = Cx(t) + v(t) w(t) = N(0,Q) v(t) = N(0,R)
The answer should be a scalar negative value. On breaking up the equation, till the first three terms I am getting a scalar negative value. But as soon as I include the fourth term
(T-1)/2 log (abs(Q)) the value of the log-likelihood becomes a matrix with positive values in the diagonal and off-diagonal elements being infinity. Is my understanding of the notation incorrect? Is
| .| not absolute but the determinant of Q? Same for
Thank you for help.
UPDATE: Based on the answer, For the second expression: - 0.5*T*log(det(R)) the answer is coming : -0.5*T*log(0.0100) which becomes positive. How do I mitigate this problem?