Likelihood

Likelihood of gaussian models

Likelihood of a multivariate normal distribution

The pdf of a multivariate normal distribution is:

If we set

the log-likelihood is:

In most cases, we will use a covariance matrix with a (unknown) scaling factor:

If we set

the log-likelihood can then be written:

The scaling factor can be concentrated out of the likelihood. Its estimator is

so that :

or

Maximizing $ l_c $ is equivalent to minimizing the deviance

This last formulation will be used in optimization procedures based on sums of squares (Levenberg-Marquardt and similar algorithms).

Linear model with gaussian noises

The likelihood is often computed on a linear model

The log-likelihood is then

The maximum likelihood estimator of $\beta$ is

which is normally distributed with variance

The formulae of the likelihood are still valid, using

Implementation

Those representations of the concentrated likelihood are defined in the interfaces demetra.likelihood.ILikelihood and demetra.likelihood.IConcentratedLikelihood

Correspondance between the elements of the likelihood (see formulae) and the methods of the classes

  • $n$ : dim()
  • $e’e$ : ssq()
  • $e$ : e()
  • $\log |\Omega|$ : logDeterminant()
  • $v$ : v()
  • $|\Omega|^{\frac{1}{n}}$ : factor()

Remarks

Missing values

Missing values are not taken into account in the likelihood. More especially, when they are estimated by means of additive outliers, all the different elements of the likelihood (dimension, determinantal term, coefficients…) should be adjusted to remove their effect.

Perfect collinearity in X

In the case of perfect collinearity in the linear model, the dimensions of the coefficients and of the related matrices are not modified. However, information related to the redundant variables is set to 0.

Bibliography

Gomez V. and Maravall A. (1994): “Estimation, Prediction, and Interpolation for Nonstationary Series With the Kalman Filter”, Journal of the American Statistical Association, vol. 89, n° 426, 611-624.