GetFitARpLS {FitAR}R Documentation

LS for AR(p) and Subset ARp – Short Version

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

GetFitARpLS(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
pvec lags of estimated AR coefficient
res the least squares regression residuals
InvertibleQ True, if the estimated parameters are in the AR admissible region.
yX the y vector and X matrix used for the regression fitting

Note

This is a helper function for FitARp which is invoked by the main package function FitAR. Normally the user would FitAR since this function provides generic print, summary, resid and plot methods but GetFitARpLS 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.

McLeod, A.I. and Zhang, Y. (2008a). Faster ARMA Maximum Likelihood Estimation, Computational Statistics and Data Analysis 52-4, 2166-2176. DOI link: http://dx.doi.org/10.1016/j.csda.2007.07.020.

McLeod, A.I. and Zhang, Y. (2008b, Submitted). Improved Subset Autoregression: With R Package. Journal of Statistical Software.

See Also

FitAR, FitARz, GetFitARz, FitARp, GetFitARpMLE, RacfPlot

Examples

#Fit subset AR using LS
data(SeriesA)
#normally use FitAR
ans<-FitAR(SeriesA, c(1,2,7), ARModel="ARp", MLEQ=FALSE)
#could also use FitARp
ans<-FitARp(SeriesA, c(1,2,7))
#for some applications GetFitARpLS is simpler and faster
ansLS<-GetFitARpLS(SeriesA, c(1,2,7))
ansLS

[Package FitAR version 1.74 Index]