Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logLik.nlVar

Extract Log-Likelihood


Description

Log-Likelihood method for VAR models.

Usage

## S3 method for class 'nlVar'
logLik(object, ...)

Arguments

object

object of class VAR computed by lineVar.

...

additional arguments to logLik.

Details

The Log-Likelihood is computed as in Luetkepohl (2006) equ. 3.4.5 (p. 89) and Juselius (2006) p. 56:

LL = -(TK/2) \log(2π) - (T/2) \log|Σ| - (1/2) ∑^{T} ≤ft [ (y_t - A^{'}x_t)^{'} Σ^{-1} (y_t - A^{'}x_t) \right ]

Where Σ is the Variance matrix of residuals, and x_t is the matrix stacking the regressors (lags and deterministic).

However, we use a computationally simpler version:

LL = -(TK/2) \log(2π) - (T/2) \log|Σ| - (TK/2)

See Juselius (2006), p. 57.

(Note that Hamilton (1994) 11.1.10, p. 293 gives + (T/2) \log|Σ^{-1}|, which is the same as -(T/2) \log|Σ|).

Value

Log-Likelihood value.

Author(s)

Matthieu Stigler

References

Hamilton (1994) Time Series Analysis, Princeton University Press

Juselius (2006) The Cointegrated VAR model: methodology and Applications, Oxford Univesity Press

Luetkepohl (2006) New Introduction to Multiple Time Series Analysis, Springer

Examples

data(zeroyld)
data<-zeroyld

#Fit a VAR
VAR<-lineVar(data, lag=1)
logLik(VAR)

tsDyn

Nonlinear Time Series Models with Regime Switching

v10-1.2
GPL (>= 2)
Authors
Antonio Fabio Di Narzo [aut], Jose Luis Aznarte [ctb], Matthieu Stigler [aut], Ho Tsung-wu [cre]
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.