GetFitAR {FitAR} | R Documentation |
Obtains the exact MLE for AR(p) or subset AR model. This function is used by FitAR. One might prefer to use GetFitAR for applications such as bootstrapping since it is faster than FitAR.
GetFitAR(z, pvec, MeanValue=0, ...)
z |
time series |
pvec |
lags included in AR model. If pvec=0, white noise model assumed. |
MeanValue |
by default it is assumed the mean of z is 0 |
... |
optional arguments passed through to optim |
The built-in function optim is used to obtain the MLE estimates for an AR or subset AR.
loglikelihood |
value of maximized loglikelihood |
zetaHat |
estimated zeta parameters |
phiHat |
estimated phi parameters |
convergence |
result from optim |
A.I. McLeod
McLeod, A.I. and Zhang, Y. (2006). Partial autocorrelation parameterization for subset autoregression. Journal of Time Series Analysis, 27, 599-612.
#compare results from GetFitAR and FitAR z<-log(lynx) z<-z - mean(z) GetFitAR(z, c(1,2,8)) out<-FitAR(log(lynx), c(1,2,8)) out coef(out)