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

FastLoglikelihoodAR

Fast Computation of the Loglikelihood Function in AR


Description

Computation of the loglikelihood is O(1) flops in repeated evaluations of the loglikelihood holding the data fixed and varying the parameters. This is useful in exact MLE estimation.

Usage

FastLoglikelihoodAR(phi, n, CD)

Arguments

phi

AR coefficients

n

length of series

CD

Champernowne matrix

Details

The details of this computation are described in McLeod and Zhang (2006).

Value

Loglikelihood

Author(s)

A.I. McLeod and Y. Zhang

References

McLeod, A.I. and Zhang, Y. (2006). Partial autocorrelation parameterization for subset autoregression. Journal of Time Series Analysis, 27, 599-612.

See Also

Examples

#Compute the loglikelihood using the direct method as implemented
# in LoglikelihoodAR and using the fast method
phi<-PacfToAR(rep(0.5,10))
p<-length(phi)
z<-SeriesA-mean(SeriesA)
n<-length(z)
L1<-LoglikelihoodAR(phi, z)
cd<-ChampernowneD(z,p,MeanZero=TRUE)
L2<-FastLoglikelihoodAR(phi,n,cd)
out<-c(L1,L2)
names(out)<-c("direct","fast")
out

FitAR

Subset AR Model Fitting

v1.94
GPL (>= 2)
Authors
A.I. McLeod, Ying Zhang and Changjiang Xu
Initial release
2013-03-15

We don't support your browser anymore

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