Module 4 — Estimation, Likelihood, and Inference

Derive AR estimators from regression and moment equations, evaluate exact Gaussian likelihoods with covariance matrices, and interpret uncertainty.

Module 4 — Estimation, Likelihood, and Inference

Core question

How does a finite dependent vector identify model parameters, and how should its covariance structure enter estimation and uncertainty?

Learning outcomes

You will be able to:

  • express conditional AR estimation as matrix least squares;
  • derive Yule–Walker estimators from autocovariance equations;
  • evaluate an exact Gaussian likelihood with Cholesky factors;
  • connect the joint likelihood to the innovations likelihood;
  • obtain curvature-based standard errors and state their limitations;
  • diagnose a fitted model with residual covariance, not one scalar score.

1. Conditional AR estimation is regression

For an AR(pp),

Xt=ϕ1Xt1++ϕpXtp+εt,X_t=\phi_1X_{t-1}+\cdots+\phi_pX_{t-p}+\varepsilon_t,

stack observations t=p+1,,nt=p+1,\ldots,n:

y=[xp+1xp+2xn],X=[xpxp1x1xp+1xpx2xn1xn2xnp].\mathbf y= \begin{bmatrix} x_{p+1}\\x_{p+2}\\ \vdots\\x_n \end{bmatrix}, \qquad \mathcal X= \begin{bmatrix} x_p&x_{p-1}&\cdots&x_1\\ x_{p+1}&x_p&\cdots&x_2\\ \vdots&\vdots&&\vdots\\ x_{n-1}&x_{n-2}&\cdots&x_{n-p} \end{bmatrix}.

Then

y=Xϕ+ε,ϕ^CLS=(XX)1Xy.\mathbf y=\mathcal X\boldsymbol\phi+\boldsymbol\varepsilon, \qquad \widehat{\boldsymbol\phi}_{CLS} =(\mathcal X^\top\mathcal X)^{-1}\mathcal X^\top\mathbf y.

This is conditional least squares because the first pp observations are treated as fixed initial conditions. In R, qr.solve(X, y) or lm.fit(X, y) is preferable to forming (XX)1(X^\top X)^{-1}.

2. Yule–Walker estimates second-order equations

For a stationary AR(pp), multiply the model by XthX_{t-h} and take expectations. For h1h\ge1:

γ(h)=ϕ1γ(h1)++ϕpγ(hp).\gamma(h)=\phi_1\gamma(h-1)+\cdots+\phi_p\gamma(h-p).

The first pp equations are

[γ(0)γ(1)γ(p1)γ(1)γ(0)γ(p2)γ(p1)γ(p2)γ(0)]Γpϕ=[γ(1)γ(2)γ(p)]γp.\underbrace{ \begin{bmatrix} \gamma(0)&\gamma(1)&\cdots&\gamma(p-1)\\ \gamma(1)&\gamma(0)&\cdots&\gamma(p-2)\\ \vdots&\vdots&\ddots&\vdots\\ \gamma(p-1)&\gamma(p-2)&\cdots&\gamma(0) \end{bmatrix}}_{\Gamma_p} \boldsymbol\phi = \underbrace{ \begin{bmatrix} \gamma(1)\\ \gamma(2)\\ \vdots\\ \gamma(p) \end{bmatrix}}_{\boldsymbol\gamma_p}.

Replacing population autocovariances by sample autocovariances gives

ϕ^YW=Γ^p1γ^p.\widehat{\boldsymbol\phi}_{YW} =\widehat\Gamma_p^{-1}\widehat{\boldsymbol\gamma}_p.

Moment and conditional estimators need not agree in a short sample. Their difference is evidence about finite-sample conventions, not automatically an error.

3. Exact Gaussian likelihood uses the whole covariance matrix

Suppose

XnN(μθ,Σθ).\mathbf X_n\sim N(\boldsymbol\mu_\theta,\Sigma_\theta).

The log likelihood is

(θ)=12[nlog(2π)+logΣθ+(xμθ)Σθ1(xμθ)].\ell(\theta) =-\frac12\left[ n\log(2\pi)+\log|\Sigma_\theta| +(\mathbf x-\boldsymbol\mu_\theta)^\top \Sigma_\theta^{-1} (\mathbf x-\boldsymbol\mu_\theta) \right].

Every term has a role:

TermStatistical meaning
μθ\boldsymbol\mu_\thetafitted deterministic mean
$\log\Sigma_\theta
quadratic formdistance measured in covariance-adjusted units
nlog(2π)n\log(2\pi)normalising constant

For an AR(1) with zero mean,

Σθ=σε21ϕ2Toeplitz(1,ϕ,,ϕn1).\Sigma_\theta =\frac{\sigma_\varepsilon^2}{1-\phi^2} \operatorname{Toeplitz}(1,\phi,\ldots,\phi^{n-1}).

Near ϕ=1|\phi|=1, this matrix becomes increasingly ill-conditioned. That is both a statistical boundary and a numerical warning.

4. Cholesky evaluation is the stable route

If Σ=UU\Sigma=U^\top U with upper-triangular U=chol(Σ)U=\operatorname{chol}(\Sigma), then

logΣ=2ilogUii,\log|\Sigma|=2\sum_i\log U_{ii},

and

xΣ1x=Ux2.\mathbf x^\top\Sigma^{-1}\mathbf x =\|U^{-\top}\mathbf x\|^2.

The computation uses triangular solves and never forms Σ1\Sigma^{-1}.

R: exact AR(1) matrix likelihood

This cell simulates a centred AR(1), optimises the exact finite-sample likelihood, and compares it with R's arima(..., method = "ML"). Small differences arise from parameterisation and numerical optimisation, but both use the initial-state information that conditional least squares omits.

R

Optimise an exact Gaussian covariance-matrix likelihood

Idle

5. Joint and innovations likelihoods are two factorizations

The joint density factors as

p(x1,,xn)=p(x1)t=2np(xtx1,,xt1).p(x_1,\ldots,x_n) =p(x_1)\prod_{t=2}^n p(x_t\mid x_1,\ldots,x_{t-1}).

For a Gaussian process, each conditional density is determined by an innovation vtv_t and variance FtF_t:

(θ)=12t=1n[log(2π)+logFt+vt2Ft].\ell(\theta) =-\frac12\sum_{t=1}^{n} \left[\log(2\pi)+\log F_t+\frac{v_t^2}{F_t}\right].
FormComputational profile
covariance matrixtransparent for derivation; dense factorisation is roughly O(n3)O(n^3)
innovations/Kalmanprocesses observations sequentially; exploits fixed state dimension

They are mathematically equivalent under the same initialisation. R's exact arima likelihood uses a state-space representation and Kalman innovations.

6. Curvature gives local uncertainty

Let

In(θ)=E[2(θ)θθ]\mathcal I_n(\theta) =-E\left[\frac{\partial^2\ell(\theta)} {\partial\theta\partial\theta^\top}\right]

be Fisher information. Under regularity conditions,

n(θ^θ0)dN ⁣(0,I(θ0)1).\sqrt n(\widehat\theta-\theta_0) \overset{d}{\longrightarrow} N\!\left(0,\mathcal I(\theta_0)^{-1}\right).

The inverse observed Hessian estimates local parameter covariance. Do not interpret it mechanically near unit roots, non-invertible boundaries, unidentified cancellations, or structural breaks: regular asymptotics can fail exactly where the likelihood is flat or irregular.

7. Residuals estimate innovations, not truth

For residual vector ε^\widehat{\boldsymbol\varepsilon}, inspect

Γ^e=[γ^e(ij)].\widehat\Gamma_e =\left[\widehat\gamma_e(i-j)\right].

A well-specified linear mean model should leave off-diagonal entries small relative to sampling variation. Also check:

  • changing variance over time;
  • outliers and heavy tails;
  • parameter sensitivity to endpoints;
  • roots close to the unit circle;
  • near cancellation of AR and MA polynomials.

The Ljung–Box statistic compresses several sample residual correlations:

Q(m)=n(n+2)h=1mρ^e(h)2nh.Q(m)=n(n+2)\sum_{h=1}^m \frac{\widehat\rho_e(h)^2}{n-h}.

A large p-value says that this test did not detect residual autocorrelation at the chosen lags. It does not establish independence, normality, or parameter constancy.

8. Model comparison remains conditional

For maximised log likelihood \ell and kk estimated parameters,

AIC=2+2k,BIC=2+klogn.\mathrm{AIC}=-2\ell+2k,\qquad \mathrm{BIC}=-2\ell+k\log n.

Compare values only when models use the same response, likelihood convention, and effective sample. Before reading the smaller number, check admissible roots, identifiability, and residual covariance.

Practice

  1. Write X\mathcal X and y\mathbf y for an AR(2) observed at x1,,x6x_1,\ldots,x_6.
  2. Derive the AR(1) Yule–Walker estimator.
  3. Explain why logΣ\log|\Sigma| cannot be dropped when comparing covariance parameters.
  4. Show how the Cholesky factor computes xΣ1x\mathbf x^\top\Sigma^{-1}\mathbf x.
  5. Why can Hessian standard errors be misleading when ϕ^\widehat\phi is close to one?
Answers
  1. y=(x3,x4,x5,x6)\mathbf y=(x_3,x_4,x_5,x_6)^\top and the rows of X\mathcal X are (x2,x1)(x_2,x_1) through (x5,x4)(x_5,x_4).
  2. ϕ^=γ^(1)/γ^(0)\widehat\phi=\widehat\gamma(1)/\widehat\gamma(0).
  3. It penalises covariance matrices that assign broad volume; the quadratic form alone could favour inflated variance.
  4. Solve Uz=xU^\top\mathbf z=\mathbf x and compute zz\mathbf z^\top\mathbf z.
  5. The parameter lies near a non-regular boundary, the likelihood may be asymmetric, and the normal quadratic approximation can be poor.

Takeaway

Least squares, moments, and likelihood are different matrix summaries of the same dependent vector. Their assumptions, initial conditions, and numerical factorizations must be visible. Continue to Multivariate Systems.

Copyright © 2026