Skip to main content
4 of 6
improved formatting for visibility and clarification on OP question. Corrected $t-p$ as last index in the second likelihood
Gilles
  • 1k
  • 1
  • 11
  • 22

Question1: How to calculate the density function?

\begin{align} f_{Y_p,Y_{p-1},\ldots,Y_1}(y_p,y_{p-1},\dots,y_1;\mathbf{\theta}) = &\small (2\pi)^{-p/2} \left|\sigma^{-2} \mathbf{V}_p^{-1}\right|^{1/2}\exp{\left[-\frac{(\mathbf{y}_p - \mathbf{\mu}_p)'\mathbf{V}_p^{-1}(\mathbf{y}_p- \mathbf{\mu}_p)}{2 \sigma^2}\right]}\\ =&\small (2\pi)^{-p/2} (\sigma^{-2})^{p/2}\left| \mathbf{V}_p^{-1}\right|^{1/2}\exp{\left[-\frac{(\mathbf{y}_p - \mathbf{\mu}_p)'\mathbf{V}_p^{-1}(\mathbf{y}_p- \mathbf{\mu}_p)}{2 \sigma^2}\right]} \end{align}

As I said in my comments on this DSP question, you have an extra term with $\left| V_p^{-1}\right|$ both in your likelihood and loglikelihood.

Question2: What will be the complete density function and the likelihood?

The complete likelihood function is: \begin{align} f_{Y_T,Y_{T-1},\ldots,Y_1}(y_T,y_{T-1},\dots,y_1;\mathbf{\theta}) = & f_{Y_p,Y_{p-1},\ldots,Y_1}(y_p,y_{p-1},\dots,y_1;\mathbf{\theta}) \\ & \times \prod_{t=p+1}^T f_{Y_t|Y_{t-1},\ldots,Y_{t-p}}(y_t|y_{t-1},\dots,y_{t-p};\mathbf{\theta}) \end{align}

And the loglikelihood:

\begin{align} {\large\mathcal{L}}(\theta) = &\log f_{Y_T,Y_{T-1},\ldots,Y_1}(y_T,y_{T-1},\dots,y_1;\mathbf{\theta})\\ = &\log f_{Y_p,Y_{p-1},\ldots,Y_1}(y_p,y_{p-1},\dots,y_1;\mathbf{\theta}) +\log \prod_{t=p+1}^T f_{Y_t|Y_{t-1},\ldots,Y_{t-p}}(y_t|y_{t-1},\dots,y_{t-p};\mathbf{\theta})\\ =&-\frac{p}{2}\log(2\pi)-\frac{p}{2}\log(\sigma^2)+\frac{1}{2}\log\left| V_p^{-1}\right|-\frac{1}{2\sigma^2}(\mathbf{y_p} - \mathbf{\mu_p})'\mathbf{V}_p^{-1}(\mathbf{y_p}- \mathbf{\mu_p})\\ &-\frac{T-p}{2}\log(2\pi)-\frac{T-p}{2}\log(\sigma^2)\\ &-\frac{1}{2\sigma^2}\displaystyle\sum_{t=p+1}^T\left(y_t - c - \phi_1 y_{t-1}- \phi_2 y_{t-2}-\cdots- \phi_p y_{t-p}\right)^2\end{align}

Gilles
  • 1k
  • 1
  • 11
  • 22