GetLeapsAR(FitAR)R Documentation

Select lags for best subset AR-phi model

Description

The subset AR-phi model is the usual subset model, for example see Tong (1977). This function is used by SelectModel for model identification for AR-phi models.

Usage

GetLeapsAR(z, lag.max = 15, method = "AIC", Best = 3, Candidates=5)

Arguments

z ts object or vector containing time series
lag.max maximum order of the AR
method choices are "AIC" or "BIC"
Best the number of based selected based on highest AIC/BIC
Candidates number of models initially selected using the approximate criterion

Details

The R function leaps in the R package leaps is used to compute the subset regression model with the smallest residual sum of squares containing 1,...,lag.max parameters. The mean is always included, so the only parameters considered are the phi coefficients. After the best models containing 1,..,lag.max parameters are selected the models are individually refit using GetFitARLS to determine the exact likelihood function for each selected model. Based on this likelihood the AIC or BIC criterion is computed and then the best models are selected.

Value

a list with components

NumParameters
AIC
BIC
p

{lags present}

Warning

AIC and BIC values produced are not comparable to AIC and BIC produced by SelectModel for AR-zeta models. However comparable AIC/BIC values are produced when the selected models are fit by FitARLS or FitAR respectively.

Note

Requires leaps package

Author(s)

A.I. McLeod

References

Tong, H. (1977) Some comments on the Canadian lynx data. Journal of the Royal Statistical Society A 140, 432-436.

See Also

SelectModel, GetFitARLS, leaps

Examples

#for the log(lynx) Tong (1977) selected an AR-phi(1,2,4,10,11)
#using the AIC and a subset selection algorithm. Our more exact
#approach shows that the AR-phi(1,2,3,4,10,11) has slightly lower
#AIC (using exact likelihood evaluation).  
z<-log(lynx)
GetLeapsAR(z, lag.max=11)
GetLeapsAR(z, lag.max=11, method="BIC")

[Package FitAR version 1.0 Index]