GetFitAR(FitAR)R Documentation

Fit AR(p)

Description

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.

Usage

GetFitAR(z, pvec, MeanValue=0, ...)

Arguments

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

Details

The built-in function optim is used to obtain the MLE estimates for an AR or subset AR.

Value

loglikelihood value of maximized loglikelihood
zetaHat estimated zeta parameters
phiHat estimated phi parameters
convergence result from optim

Author(s)

A.I. McLeod

References

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

See Also

FitAR

Examples

#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)

[Package FitAR version 1.0 Index]