GetFitARLS {FitAR}R Documentation

Fit AR Using Least-Squares

Description

For ARp subset models, the least squares estimates are computed. The exact loglikelihood is then determined. The estimated parameters are checked to see if they are in the AR admissible region.

Usage

GetFitARLS(z, pvec)

Arguments

z vector or ts object, the time series
pvec lags included in subset AR. If pvec=0, white noise assumed.

Details

The R function lsfit is used.

Value

a list with components:

loglikeliihood the exact loglikelihood
phiHat estimated AR parameters
constantTerm constant term in the linear regression
lags estimated AR parameters
res the least squares regression residuals
yX the dependent variable column prepended to the columns of independent variables
InvertibleQ True, if the estimated parameters are in the AR admissible region.

Note

This is a helper function for FitARLS. Normally the user would FitARLS since this function provides generic print, summary, resid and plot methods but GetFitARLS is sometimes useful in iterative computations like bootstrapping since it is faster.

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

FitARLS, FitAR, GetFitAR, LoglikelihoodAR SelectModel

Examples

#Fit subset AR using GetFitARLS and FitARLS
data(SeriesA)
ansLS<-GetFitARLS(SeriesA, c(1,2,7))
ans<-FitARLS(SeriesA, c(1,2,7))
ansLS
ans
summary(ans)
summary(resid(ans))
plot(ans)

[Package FitAR version 1.0 Index]