Automatic selection of SETAR hyper-parameters
selectSETAR(x, m, d=1, steps=d, series, mL, mH,mM, thDelay=0, mTh, thVar,
th=MakeThSpec(), trace=TRUE, include = c("const", "trend","none", "both"),
common=c("none", "include","lags", "both"), model=c("TAR", "MTAR"),
ML=seq_len(mL), MH=seq_len(mH), MM=seq_len(mM), nthresh=1, trim=0.15,
criterion = c("pooled-AIC", "AIC","BIC", "SSR"), plot=TRUE,
max.iter=2, type=c("level", "diff", "ADF"), same.lags=FALSE,
restriction=c("none","OuterSymAll","OuterSymTh"), hpc=c("none", "foreach") )
An object of class selectSETAR
(print and plot methods) with:
A data-frame, with columns giving hyper-parameter values and the computed AIC for each row (only the best 10/5s are returned)
Same as res, returned if nthresh=2 otherwise set to NULL
estimated hyper-parameters
estimated parameters, from first and conditional search
returns args given by user
all threshold values and corresponding criterion from first search
time series
embedding parameters. For their meanings, see help about nlar
time series name (optional)
autoregressive order for ‘low’ (mL
) ‘middle’ (mM
, only useful if nthresh
=2) and ‘high’ (mH
) regime (default values: m). Must be <=m. Alternatively, you can specify ML
Vector of possible ‘threshold delay’ values to check for
coefficients for the lagged time series, to obtain the threshold variable
external threshold variable
Different specifications of the grid search, to pre-specify a value or set the number of points to search. SeeMakeThSpec
should additional infos be printed? (logical)
Type of deterministic regressors to include
Indicates which elements are common to all regimes: no, only the include
variables, the lags or both
Currently not implemented
vector of lags for order for ‘low’ (ML) ‘middle’ (MM, only useful if nthresh=2) and ‘high’ (MH)regime. Max must be <=m
Number of threshold of the model
trimming parameter indicating the minimal percentage of observations in each regime. Default to 0.15
Model selection criterion
Should a plot showing the criterion values be printed? (logical)
Number of iterations for the algorithm
Whether the variable is taken is level, difference or a mix (diff y= y-1, diff lags) as in the ADF test
Logical. When AIC or pooled-AIC is used and arg m is given, should it search for same number of lags in each regime (TRUE) or allow for different (FALSE) lags in each regime. Different lags involves more computation
Restriction on the threshold. OuterSymAll
will take a symmetric threshold and symmetric coefficients for outer regimes. OuterSymTh currently unavailable
Possibility to run the bootstrap on parallel core. See details
Antonio, Fabio Di Narzo and Stigler, Matthieu
Routine for automatic selection of SETAR models hyper parameters.
An exhaustive search over all possible combinations of values of specified hyper-parameters is performed. Thus the threshold delay, the number of lags in each regime and the threshold value are computed.
Embedding parameters d,steps
are kept fixed.
Possible criteria are the usual SSR, AIC and a pooled AIC formula: \(AIC(low regime model) + AIC(high regime model)\). The default criterion is the pooled AIC formula. SSR criterion can't be used to compare models with different lags.
When two thresholds(nthresh
=2) have to be computed, the search for the second is made conditional on results for first threshold as suggested in Gonzalo and Pittarakis (2002). Refinements can be obtained by using max.iter
(first threshold being re-estimated based on the second one). If SSR is used, the number of lags in the inner regime is either the same if only arg m was given, otherwise it has to be pre-specified. Criterion AIC can be used to determine the number of lags in the nner regime, whereas pooled-AIC is currently not implemented for nthresh=2.
By default, all threshold values excluding the upper and lower trim
of the threshold values are taken as potential threshold. restriction can be made with arg th
. See function MakeThSpec
.
With the argument hpc
, the heavy grid search can be run on parallel cores, thus alleviating the time of computation. Preliminary results
indicate however that the length of the series must be very considerable in order that the parallel code becomes advantageous. To use it, the user needs simply to choose a package (among doMC, doMPI, doSNOW or doRedis) and register the backend. See the vignette for more details.
Gonzalo, J. & Pitarakis, J. (2002) Estimation and model selection based inference in single and multiple threshold models, Journal of Econometrics, 110, 319 - 352
selectLSTAR
, selectNNET
, MakeThSpec
llynx <- log10(lynx)
selectSETAR(llynx, m=2)
#Suggested model is the following:
setar(llynx, m=2, thDelay=1, th=3.4)
Run the code above in your browser using DataLab