GetFitARLS {FitAR} | R Documentation |
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.
GetFitARLS(z, pvec)
z |
vector or ts object, the time series |
pvec |
lags included in subset AR. If pvec=0, white noise assumed. |
The R function lsfit
is used.
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. |
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.
A.I. McLeod
McLeod, A.I. and Zhang, Y. (2006). Partial autocorrelation parameterization for subset autoregression. Journal of Time Series Analysis, 27, 599-612.
FitARLS
,
FitAR
,
GetFitAR
,
LoglikelihoodAR
SelectModel
#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)