Learn R Programming

FitAR (version 1.94)

GetFitARpLS: 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.

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

Details

The R function lsfit is used.

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

Run this code
#Fit subset AR using LS
#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

Run the code above in your browser using DataLab