Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

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

Examples

#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

FitAR

Subset AR Model Fitting

v1.94
GPL (>= 2)
Authors
A.I. McLeod, Ying Zhang and Changjiang Xu
Initial release
2013-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.