statsmodels.tsa.ar_model.AR.loglike¶
-
AR.
loglike
(params)[source]¶ The loglikelihood of an AR(p) process.
- Parameters
- params
ndarray
The fitted parameters of the AR model.
- params
- Returns
float
The loglikelihood evaluated at params.
Notes
Contains constant term. If the model is fit by OLS then this returns the conditional maximum likelihood.
(n−p)2(log(2π)+log(σ2))−1σ2∑iϵ2iIf it is fit by MLE then the (exact) unconditional maximum likelihood is returned.
−n2log(2π)−n2log(σ2)+12|V−1p|−12σ2(yp−μp)′V−1p(yp−μp)−12σ2n∑t=p+1ϵ2iwhere
μp is a (p x 1) vector with each element equal to the mean of the AR process and σ2Vp is the (p x p) variance-covariance matrix of the first p observations.