Automated General-to-Speciﬁc (GETS) Regression Modeling and Indicator Saturation for Outliers and Structural Breaks

This paper provides an overview of the R package gets , which contains facilities for automated general-to-speciﬁc (GETS) modeling of the mean and variance of a regression, and indicator saturation (IS) methods for the detection and modeling of outliers and structural breaks. The mean can be speciﬁed as an autoregressive model with covariates (an “AR-X” model), and the variance can be speciﬁed as an autoregressive log-variance model with covariates (a “log-ARCH-X” model). The covariates in the two speciﬁcations need not be the same, and the classical linear regression model is obtained as a special case when there is no dynamics, and when there are no covariates in the variance equation. The four main functions of the package are arx , getsm , getsv and isat . The ﬁrst function estimates an AR-X model with log-ARCH-X errors. The second function undertakes GETS modeling of the mean speciﬁcation of an ‘ arx ’ object. The third function undertakes GETS modeling of the log-variance speciﬁcation of an ‘ arx ’ object. The fourth function undertakes GETS modeling of an indicator-saturated mean speciﬁcation allowing for the detection of outliers and structural breaks. The usage of two convenience functions for export of results to EViews and Stata are illustrated, and L A TEX code of the estimation output can readily be generated.


Introduction
General-to-specific (GETS) modeling combines well-known ingredients: backwards elimination, single and multiple hypothesis testing, goodness-of-fit measures and diagnostics tests. The way these are combined by GETS modeling enables rival theories and models to be tested against each other, ultimately resulting in a parsimonious, statistically valid model that explains the characteristics of the data being investigated. The methodology thus provides a systematic and coherent approach to model development and maintenance, cumulative research and scientific progress. This paper provides an overview of the R (R Core Team 2018) package gets (Sucarrat, Pretis, and Reade 2018), which contains facilities for automated general-to-specific (GETS) modeling of the mean and variance of cross-sectional and time series regressions, and indicator saturation (IS) methods for the detection and modeling of outliers and structural breaks in the mean.
The origins of GETS modeling can be traced back to Denis Sargan and the London School of Economics (LSE) during the 1960s, see Hendry (2003) and Mizon (1995). However, it was not until the 1980s and 1990s that the methodology gained widespread acceptance and usage in economics, with David F. Hendry in particular being a main proponent, see the two-volume article collection by Campos, Hendry, and Ericsson (2005) for a comprehensive overview of the GETS methodology. An important software contribution to GETS modeling was made in 1999, when Hoover and Perez (1999) re-visited the data mining experiment of Lovell (1983). Hoover and Perez (1999) showed that automated multi-path GETS modeling substantially improved upon the then (in economics) popular model selection strategies. In the study of Hoover and Perez (1999), purpose-specific but limited MATLAB (The MathWorks Inc. 2017) code was used in the simulations. 1 Subsequently, further improvements were achieved in the commercial software packages PcGets (Hendry and Krolzig 2001) and in its successor Autometrics (Doornik and Hendry 2007a). In particular, indicator-saturation methods for the detection of outliers and structural breaks proposed by Hendry, Johansen, and Santos (2008) were added to Autometrics in 2008, see Doornik (2009). Another milestone was reached in 2011, when the R package AutoSEARCH (Sucarrat 2015a) was published on the Comprehensive R Archive Network (CRAN). The package, whose code was developed based on Sucarrat and Escribano (2012), offered automated GETS modeling of conditional variance specifications within the log-ARCH-X class of models. The R package gets, available from CRAN since October 2014, is the successor of AutoSEARCH. The gets package, at the time of writing, is the only statistical software that offers GETS modeling of the conditional variance of a regression, in addition to GETS modeling of the mean of a regression, and indicator saturation (IS) methods for the detection of breaks of outliers structural breaks in the mean of a regression using impulses (IIS), step (SIS; see Castle, Doornik, Hendry, and Pretis 2015) as well as trend indicators (TIS).
This paper provides an overview of the gets package. The main model class under consideration is the autoregressive (AR) model with exponential autoregressive conditional heteroscedastic (ARCH) variance, possibly with additional covariates in the mean or variance equations, or in both. In short, the AR-X model with a log-ARCH-X error term, where the "X" refers to the covariates (the covariates need not be the same in the mean and variance specifications). It should be underlined, however, that gets is not limited to time series models (see Section 2.3): Static models (e.g., cross-sectional or panel) can be estimated by specifying the regression without dynamics. The next section, Section 2, provides an overview of GETS modeling and its alternatives, and outlines the principles that guides the development of gets. Section 3 contains a note on the advantage of providing the data with time series attributes -if the data are indeed time series, since this is useful for the estimation of dynamic models, output and graphing. Section 4 contains an overview of the AR-X model with log-ARCH-X errors, explains how it can be simulated, and illustrates how it can be estimated with the arx function. Section 5 illustrates how GETS modeling can be undertaken with the getsm and getsv functions. The first undertakes GETS modeling of the mean specification, whereas the second undertakes GETS modeling of the log-variance specification. Section 6 introduces the isat function for indicator saturation methods. Section 7 illustrates how two convenience functions, eviews and stata, facilitate GETS modeling by users of EViews (IHS Markit 2017) or Stata (StataCorp 2017), i.e., the two most popular commercial software packages in econometrics. The section also briefly alludes to how estimation output can readily be converted into L A T E X code. Finally, Section 8 concludes.

GETS modeling
It is convenient to provide an overview of GETS modeling in terms of the linear regression model y t = β 1 x 1t + · · · + β k x kt + u t , t = 1, 2, . . . , n, where y t is the dependent variable, the β's are slope coefficients, the x's are the regressors and u t is a zero mean error term. GETS modeling assumes there exists at least one "local" data generating process (LDGP) nested in (1). By philosophical assumption the DGP is not contained in the simple model above, see Sucarrat (2010) and Hendry and Doornik (2014, Sections 6.2-6.3). The qualifier "local" thus means it is assumed that there exists a specification within (1) that is a statistically valid representation of the DGP. Henceforth, for notational and theoretical convenience, we will assume there exists only a single LDGP, but this is not a necessary condition.
A variable x jt , j ∈ {1, . . . , k}, is said to be relevant if β j = 0 and irrelevant if β j = 0. Let k rel ≥ 0 and k irr ≥ 0 denote the number of relevant and irrelevant variables, respectively, such that k rel + k irr = k. Of course, both k rel and k irr are unknown to the investigator. GETS modeling aims at finding a specification that contains as many relevant variables as possible, and a proportion of irrelevant variables that corresponds to the significance level α chosen by the investigator. Put differently, if k rel and k irr are the retained number of relevant and irrelevant variables, respectively, then GETS modeling aims at satisfying E( k rel /k rel ) → 1 and E( k irr /k irr ) → α as n → ∞, when k rel , k irr > 0. If either k rel = 0 or k irr = 0, then the criteria are modified in the obvious ways: If k rel = 0, then E( k rel ) = 0, and if k irr = 0, then E( k irr ) = 0. The proportion of spuriously retained variables, i.e., k irr /k irr , is also referred to as gauge in the GETS literature, with distributional results on the gauge for a specific case (the variables being impulses as in IIS) provided in Johansen and Nielsen (2016). The relevance proportion, i.e., k irr /k irr , is also referred to as potency in the GETS literature. Table 1 contains a comparison of the variable selection properties of GETS software packages for some well-known experiments.
As the results show, gets performs as expected in the experiments, since the irrelevance proportion corresponds well to the nominal regressor significance level α, and since the relevance  Table 2 in Sucarrat and Escribano (2012, p. 724) augmented by the properties of gets, see Appendix A for more details on the simulations. The variable selection is undertaken with a nominal regressor significance level of 5%. m( k rel /k rel ), average proportion of relevant variables k rel retained relative to the actual number of relevant variables k rel . m( k irr /k irr ), average proportion of irrelevant variables k irr retained relative to the actual number of irrelevant variables k irr in the GUM. p(DGP), proportion of times the exact DGP is found. The properties of the HP1999 algorithm are from Hoover and Perez (1999 , Table 4  proportion is 1. Additional simulations, and comparisons against alternative algorithms, are contained in Section 2.2. GETS modeling combines well-known ingredients from the model-selection literature: backwards elimination, tests on the β j 's (both single and multiple hypothesis tests), diagnostics tests, and fit-measures (e.g., information criteria). Specifically, GETS modeling may be described as proceeding in three steps: 1. Formulate a general unrestricted model (GUM) that passes a set of chosen diagnostic tests. 2 Each non-significant regressor in the GUM constitutes the starting point of a backwards elimination path, and a regressor is non-significant if the p value of a twosided t test is lower than the chosen significance level α.
2. Undertake backwards elimination along multiple paths by removing, one-by-one, nonsignificant regressors as determined by the chosen significance level α. Each removal is checked for validity against the chosen set of diagnostic tests, and for parsimonious encompassing (i.e., a multiple hypothesis test) against the GUM.
3. Select, among the terminal models, the specification with the best fit according to a fit-criterion, e.g., the Schwarz (1978) information criterion.
For k candidate variables, there are 2 k possible models. As k becomes large the number of models becomes computationally infeasible, thus, a structured search is required. GETS provides such a structured search by starting with a general model (the GUM), and subsequently removing variables along search paths while checking the diagnostics at each removal.

A comparison of GETS and gets with alternatives
When comparing the R package gets to alternatives, it is important to differentiate the methodological approach of GETS modeling relative to other modeling approaches, from different software implementations within the GETS methodology. Here, we denote the broader field of GETS modeling by GETS, and the R package by gets. First we briefly review and compare alternative approaches to GETS modeling, then we discuss alternative implementations of GETS.

GETS compared to alternative methods -A feature-based comparison
Numerous model and variable selection methods have been proposed, and an even larger number of implementations are available. Focusing on variable selection, Table 2 contains a feature-based comparison of gets against some common alternatives in R. The ar function in stats (R Core Team 2018) searches for the best AR(P ) model using the AIC. The step function, also in stats, offers both forward and backward step-wise search. The packages lars (Hastie and Efron 2013) and glmnet (Friedman, Hastie, and Tibshirani 2010), provide shrinkage-based search methods for variable selection.
As is clear from the table, GETS may be viewed as being more general than many of its competitors. This comes at a cost: computational speed. Relying on multiple path searches implies that the required computational time increases non-linearly with the number of potential candidate regressors selected over. This is a particular concern when using indicator saturation (Section 6), where the number of candidate variables scales linearly with the number of observations and subsequently implies a non-linear increase in required computational time. For example, selection over k (irrelevant) candidate regressors in gets (in a sample of n = 200 observations) on a 1.8GHz processor requires approximately 0.8 seconds (s) for k = 10, 2.9s for k = 20, 15s for k = 40, and 114s for k = 80. By contrast, the identical experiment with k = 80 requires 0.16s using the lasso in glmnet, 0.41s in lars, and 0.3s using step (backward). Hendry and Doornik (2014, Section 17) together with Castle, Doornik, and Hendry (2011) provide a broad overview of the performance of GETS relative to alternative model selection strategies of the mean of a regression, including step-wise regression, information criteria and penalized shrinkage-based selection using the lasso (see Tibshirani 1996). Castle et al. (2015) compare GETS in the context of step-shifts against the lasso using LARS (Efron, Hastie, Johnstone, and Tibshirani 2004), and Pretis, Schneider, Smerdon, and Hendry (2016) compare GETS against the lasso for designed break functions (see Section 6.3 for a more   (Friedman et al. 2010).

GETS compared to alternative methods -a performance-based comparison
detailed discussion of gets in the context of break detection). In both instances shrinkagebased selection is implemented using the R packages lars (Hastie and Efron 2013) and glmnet (Friedman et al. 2010). The emerging consensus from these simulation comparisons is that the false-positive rate, or irrelevance proportion or gauge, is erratic and difficult to control in stepwise as well as shrinkage-based selection procedures. When selecting on information criteria only, the implicit significance level of selection results in a high gauge when the number of candidate variables increases relative to the sample size. In contrast, the gauge tends to be well-calibrated around the nominal size of selection α in GETS. While the retention of relevant variables often is high in shrinkage-based approaches (and erratic in step-wise regression), this result comes at the cost of a high gauge and the performance becomes less reliable in the presence of correlation between the candidate variables.
To provide additional comparisons of performance to alternative methods for detecting relevant and discarding irrelevant variables, here we compare gets to: shrinkage-based selection, 1-cut selection (where all variables with p values ≤ α in the GUM are retained in a single decision), and conducting selection inference starting at the DGP itself. The results are provided in Figure 1 (and Tables 5, 6, and 7 in Appendix B). The simulations cover three correlation structures of regressors: First, in-expectation uncorrelated regressors, second, positively correlated regressors (ρ = 0.5), and third, alternating negatively correlated regressors (where We consider a total of k = 20 regressors in a sample of n = 500 observations for 1000 replications. The number of relevant regressors is increased from k rel = 0 to k rel = 10 with coefficients set to correspond to an expected t-statistic of ≈ 3. The performance of gets using the getsm function is compared to the cross-validated lasso in glmnet and the lasso with fixed penalty parameter such that the false-detection rate approximately matches getsm under the null (when k rel = 0). The significance level of 1-cut selection is chosen to match α = 1% in getsm selection.
The simulation results presented here match the evidence from previous studies: GETS selection yields a false-detection rate close to the nominal size of selection regardless of the correlation structure of regressors considered. While exhibiting high potency, the false detection rate of lasso is difficult to control when the correlation structure varies and the number of relevant variables is unknown. GETS dominates 1-cut selection when regressors are correlated, and closely matches 1-cut in absence of correlation.
To the best of our knowledge, the only currently publicly available software that provides automated model selection of the variance is gets. The reason for this is that gets sidesteps the numerical estimation difficulties usually associated with models of the variance thanks to its OLS estimation procedure, see the discussion in Sucarrat and Escribano (2012).

Alternatives within the field of GETS
There have been different software implementations of GETS modeling - Table 3 summarizes the similarities and differences between these. The main (currently available) alternative to the package gets for GETS modeling of the mean in regression models is Autometrics (Doornik 2009) written in Ox (Doornik 2006) within the software package PcGive (Doornik and Hendry 2007b). Autometrics and gets share common features in GETS modeling of the mean in regression models, and in the general implementation of impulse-and step-indicator saturation. There are, however, notable differences between the two implementations: The main advantages of gets lie in being the only GETS implementation of variance models, the implementation of new and unique features in indicator saturation methods including trendindicator saturation (TIS), consistency and efficiency corrections of the variance estimates,  and testing of the time-varying mean (see Section 6.3 for an in-depth discussion of the differences in indicator saturation between Autometrics and gets), as well as new features in model selection (e.g., the availability of a direct function to correct for model-selection bias). In turn, selection over systems of equations can be conducted automatically in Autometrics while having to be done by one-equation at a time in gets.

Development principles of the package gets
The original motivation behind the precursor of gets (i.e., AutoSEARCH) was to make GETS modeling methods of the variance (and mean) of a regression freely and publicly available, while being open-source and implementing recent developments in GETS. This principle will continue to guide the development of gets. Indicator saturation methods were added to gets in version 0.2, and we plan to expand gets further to include model classes for which there currently is no GETS software, e.g., spatial models, panel-data, etc. Naturally, we encourage others keen to develop and publish GETS modeling methods for a wider range of alternatives, either within the gets package or as a separate package. Another important development principle is that we would like to enable more user-specified control. Userspecified diagnostics, for example, were added in version 0.10, and we also plan to enable user-specified estimation and inference procedures (this is already available in arx, but not in getsm, getsv and isat). Finally, we also aim at making the package computationally faster and more user-friendly.

Setting time series attributes
The gets package is not limited to time series models and does not require that time series characteristics are set beforehand (for example if the data at hand are not time series). However, if time series characteristics are not set, and if the data are in fact time series, then graphs and other outputs (e.g., fitted values, residuals, etc.) are not optimal. The gets package is optimized to work with Z's ordered observations (ZOO) package zoo, see Zeileis and Grothendieck (2005). In fact, the fitted values, residuals, recursive estimates and so on returned by gets functions, are all objects of class 'zoo'. The zoo package provides a very general and versatile infrastructure for observations that are ordered according to an arbitrary index, e.g., time series, and zoo is adapted to interact well with the less versatile time series class of the base distribution, 'ts': To convert 'ts' objects to 'zoo' objects, simply use as.zooreg (preferred) or as.zoo. See the help system and webpage of the zoo package for several short intros and vignettes: https://CRAN.R-project.org/package=zoo.

The AR-X model with log-ARCH-X errors
The specifications considered by gets are all contained in the AR-X model with log-ARCH-X errors. This model is made up of two equations, one for the mean and one for the log-variance: The conditional mean equation (3) is an autoregressive (AR) specification of order R with S covariates x m 1,t , . . . , x m S,t ("X"), AR-X for short. The covariates may contain lags of conditioning variables. The error term t is a product of the time-varying conditional standard deviation σ t > 0 and the real-valued innovation z t , where z t is iid with zero mean and unit variance conditional on the past. The conditional log-variance equation (4) is given by a logarithmic autoregressive conditional heteroscedasticity (log-ARCH) specification of order P with volatility proxies defined as EqWMA q,t−1 = ( 2 t−1 + · · · + 2 t−q )/q, A logarithmic asymmetry terms (i.e., "leverage") analogous to those of Glosten, Jagannathan, and Runkle (1993) -so I t−a <0 is an indicator function equal to 1 if t−a < 0 and 0 otherwise, and D covariates x v 1,t , . . . , x v D,t , log-ARCH-X for short. The covariates may contain lags of conditioning variables, and the covariates in the mean need not be the same as those of the log-variance specification. Hence the superscripts m and v, respectively. The log-proxies ln EqWMA q,t−1 , where EqWMA is short for equally weighted moving average, are intended to proxy lagged log-GARCH terms, e.g., ln σ 2 t−1 . However, it should be noted that the log-proxies can also be given additional interpretation of interest. For example, if y t = t is a daily financial return, and if the returns are recorded over weekdays only, then EqWMA 5,t−1 , EqWMA 20,t−1 and EqWMA 60,t−1 can be interpreted as the "weekly", "monthly" and "quarterly" volatilities, respectively. The log-proxies thus provide great flexibility in modeling the persistence of logvolatility. Also, note that EqWMA q,t−1 = ln 2 t−1 , i.e., the ARCH(1) term, when q = 1. Of course, additional volatility proxies can be included via the covariates x d,t .
The model (3)-(4) is estimated in two steps. 3 First, the mean specification (3) is estimated by OLS. The default variance-covariance matrix is the ordinary one, but -optionally -this can be changed to either that of White (1980) or that of Newey and West (1987). Second, the nonlinear AR-representation of (4) is estimated, also by OLS. The nonlinear AR-representation is given by . This provides consistent estimates of all the parameters in (4) except α 0 , under appropriate assumptions. To identify α 0 , an estimate of E(ln z 2 t ) is needed, which depends on the density of z t . Sucarrat, Grønneberg, and Escribano (2016) show that a simple formula made up of the residuals u t provides a consistent and asymptotically normal estimate under very general and nonrestrictive assumptions. The estimator is essentially the negative of the natural log of the smearing estimate of Duan (1983) . So the expression in square brackets is the smearing estimate. The log-variance intercept α 0 can thus be estimated by α * 0 − E(ln z 2 t ). Finally, the ordinary variance-covariance matrix is used for inference in the log-variance specification, since the error term u t of the nonlinear AR-representation is iid.

Simulation
Simulation from an AR(P ) process can readily be done with the arima.sim function in the stats package (part of the base distribution of R). For example, the following code simulates 100 observations from the AR(1) model y t = φ 0 + φ 1 y t−1 + t with φ 0 = 0 and φ 1 = 0.4: R> set.seed(123) R> y <-arima.sim(list(ar = 0.4), 100) To simulate from a model with log-ARCH errors, we first need to simulate the errors. This can be achieved with lgarchSim from the lgarch package (Sucarrat 2015b):

R> library("lgarch")
Next, the following code simulates an error-term t that follows the log-ARCH(1) specification ln σ 2 t = α 0 + α 1 ln 2 t−1 with α 0 = 0 and α 1 = 0.3: By default, the standardized error z t is normal, but this can be changed via the innovation argument of the lgarchSim function. To combine the log-ARCH error with an AR(1) model with φ 0 = 0 and φ 1 = 0.4 the following code can be used: R> yy <-arima.sim(list(ar = 0.4), 100, innov = eps) improve the asymptotic efficiency. Joint estimation of the two equations in a single step, e.g., by Gaussian maximum likelihood, is likely to be asymptotically more efficient when zt is not too fat-tailed, see Francq and Sucarrat (2018). In finite samples, however, it is likely to be less efficient when many parameters are estimated simultaneously due to numerical issues.

arx: Estimation
The function arx estimates an AR-X model with log-ARCH-X errors. For example, the following code loads the gets package, fits an AR(1) model to the mean of the series y generated in Section 4.1, and stores the results in an object called mod01: R> library("gets") R> mod01 <-arx(y, ar = 1) To print the estimation results, simply type mod01. The three diagnostic tests are all of the standardized residuals z t . The AR and ARCH tests are Ljung and Box (1978) tests for serial correlation in z t and z 2 t , respectively, and the number in parentheses indicates at which lag the test is conducted. The Jarque and Bera (1980) test is for non-normality. It should be noted though that normality of z t is not required for consistent estimation nor for valid inference asymptotically. R-squared is that of the mean specification, whereas the (Gaussian) log-likelihood is made up of the residuals t . If no logvariance specification is fitted, then the conditional variance in the log-likelihood is constant and equal to the sample variance of the residuals. By contrast, if a log-variance specification is fitted, then the conditional variance in the log-likelihood is equal to the fitted conditional variance, which is given by σ 2 t = exp(ln σ 2 t ). The main optional arguments of the arx function when estimating the mean are: • mc: TRUE or FALSE (default). mc is short for "mean constant", so mc = TRUE includes an intercept, whereas FALSE does not.
• mxreg: vector, matrix or 'zoo' object that contains additional regressors to be included in the mean specification.
• vcov.type: the type of variance-covariance matrix used for inference in the mean specification. By default, the ordinary ("ordinary") matrix is used. The other options available are "white", i.e., the heteroscedasticity robust variance-covariance matrix of White (1980), and "newey-west", i.e., the heteroscedasticity and autocorrelation robust variance-covariance matrix of Newey and West (1987).
To make full use of these arguments, let us first generate a set of 5 regressors: R> mX <-matrix(rnorm(100 * 5), 100, 5) Next, the following code estimates an AR-X model with an intercept, two AR-lags and five regressors, and stores the estimation results in an object called mod02: R> mod02 <-arx(y, mc = TRUE, ar = 1:2, mxreg = mX, vcov.type = "white") Estimation of the log-variance specification is also undertaken with the arx function. For example, the following code fits the log-ARCH(1) specification ln σ 2 t = α 0 + α 1 ln 2 t−1 to the variable eps generated above: R> mod03 <-arx(eps, arch = 1) Typing mod03 prints the estimation results. The main optional arguments when estimating the log-variance are: • arch: integer vector that indicates the log-ARCH terms to include, say, arch = 1, arch = 1:3 or arch = c(3, 5).
• vxreg: vector, matrix or 'zoo' object that contains additional regressors to be included in the log-volatility specification.

Extraction functions
Currently there are fourteen functions available for extracting information from 'arx' objects. These functions (most of them S3 methods) are: coef, ES, fitted, logLik, plot, predict, print, recursive, residuals, rsquared, sigma, summary, VaR, vcov Six of these (coef, fitted, predict, recursive, residuals and vcov) have an optional argument that allows you to choose whether to extract information pertaining to the mean or log-variance specification. The print function prints the estimation result, logLik extracts the (Gaussian) log-likelihood associated with the joint model, summary lists the entries of the 'arx' object (a list), plot plots the fitted values and residuals of the model, recursive computes and -optionally -plots the recursive coefficient estimates, rsquared and sigma extract the R-squared and standard error of regression, respectively, while ES and VaR extract the conditional expected shortfall and value-at-risk, respectively.

Example: Quarterly inflation with time-varying conditional variance
When Engle (1982) proposed the ARCH class of models, his empirical application was the uncertainty of UK-inflation. However, the ARCH(4) specification he used to model the conditional variance was severely restricted in order to ensure the positivity of the variance estimates, see Engle (1982Engle ( , p. 1002. Arguably, this is why (non-exponential) ARCH specifications never became popular in macroeconomics. The log-ARCH class of models, by contrast, does not suffer from the positivity problem, since the conditional variance is specified in logs.
To illustrate we fit an AR(4)-X-log-ARCH(4)-X model to a quarterly inflation series, and show that the conditional variance specification provides a substantial improvement in terms of fit and diagnostics.
The following code imports the data 4 and assigns it quarterly time series attributes: R> data("infldata", package = "gets") R> infldata <-zooreg(infldata[, -1], frequency = 4, start = c(1989, 1)) Note that [, -1] removes the first column, since it is not needed. The dataset thus contains four variables: infl, q2dum, q3dum and q4dum. The first variable is quarterly Norwegian inflation (year-on-year) in % from 1989(1) to 2015(4), whereas the latter three are seasonal dummies associated with the second, third and fourth quarter, respectively. Initially, to illustrate why a time-varying conditional variance is needed, we estimate only the mean specification: That is, an AR(4)-X, where the dummies constitute the X-part. The diagnostics suggest the standardized residuals are autocorrelated and heteroscedastic, since the tests for autocorrelation and heteroscedasticity yield p values of 0.6% and 1.5%, respectively. Next, we specify the conditional variance as a log-ARCH(4)-X, where the Xpart is made up of the seasonal dummies: The code The first noticeable difference between inflMod01 and inflMod02 is that the diagnostics improve substantially. In inflMod02, the AR and ARCH tests of the standardized residuals suggest the standardized error z t is uncorrelated and homoscedastic at the usual significance levels (1%, 5% and 10%), and the Jarque and Bera (1980) test suggests z t is normal. The second noticeable improvement is in terms of fit, as measured by the average (Gaussian) log-likelihood. In inflMod01 the average log-likelihood is −110.57435/104 = −1.06, whereas in inflMod02 the average log-likelihood is −82.3289/100 = −0.82. This is a substantial increase. In terms of the Schwarz (1978) information criterion (SC), which favors parsimony, a comparison of the average log-likelihoods can be made by the info.criterion function: R> info.criterion(as.numeric(logLik(inflMod01)), n = 104, k = 8 + 1) R> info.criterion(as.numeric(logLik(inflMod02)), n = 100, k = 8 + 8) As is clear, the value falls from 2.53 in inflMod01 to 2.38 in inflMod02. (A comparison of the average log-likelihoods is necessary, since the two models are estimated with a different number of observations. This is the main difference between the info.criterion function and AIC and BIC.) Together, the enhanced fit and diagnostics indicate the log-variance specification provides a notable improvement. Later, in Section 5.4, we will undertake GETS modeling of the mean and variance specifications of inflMod02.

Example: A log-ARCH-X model of daily SP500 volatility
The most common volatility specification in finance are first order GARCH-like specifications. In the log-GARCH class of models, this corresponds to a log-GARCH(1, 1): ln σ 2 t = α 0 + α 1 ln 2 t−1 + β 1 ln σ 2 t−1 . Here, we show that a log-ARCH-X model that makes use of commonly available information provides a better fit.

getsm: Modeling the mean
GETS modeling of the mean specification in a regression (e.g., a simple time series or crosssectional model) is undertaken by applying the getsm function on an 'arx' object. This conducts GETS variable selection on the regressors included in the initially specified arx model. For example, the following code performs GETS model selection on the regressors of the mean specification of mod05 with default values on all the optional arguments: The results are stored in an object named getsm05, and typing getsm05 gives: The first part of the printed results pertains to the GUM. Note in particular that regressors are numbered (the reg.no column in the GUM mean equation). This is useful when interpreting Paths searched, which indicates in which order the regressors are deleted in each path. Next, the Terminal models list the distinct terminal specifications. Note that the GUM is always included in this list to ensure a non-empty list. By default, the Schwarz (1978) information criterion (sc) is used to choose among the terminals, but this can be changed (see below). The last part contains the estimation results of the final, simplified model.
The main optional arguments of the getsm function are (type args(getsm) or ?getsm for all the arguments): • t.pval: numeric value between 0 and 1 (The default is 0.05). The significance level used for the two-sided t tests of the regressors.
• wald.pval: numeric value between 0 and 1 (the default is t.pval). The significance level used for the parsimonious encompassing test (PET) against the general unrestricted model (GUM) at each regressor deletion.
• do.pet: logical, TRUE (the default) or FALSE. If TRUE, then a PET against the GUM is undertaken at each regressor removal.
• ar.LjungB: a list with two elements named lag and pval, respectively, or NULL. If the list is not NULL, then a Ljung and Box (1978) test for serial correlation in the standardized residuals is undertaken at each attempt to remove a regressor. The default, list(lag = NULL, pval = 0.025), means the lag is chosen automatically (as max(ar) + 1), and that a p value of pval = 0.025 is used. If the list is NULL, then the standardized residuals z t are not checked for serial correlation after each removal.
• arch.LjungB: a list with two elements named lag and pval, respectively, or NULL. If the list is not NULL, then a Ljung and Box (1978) test for serial correlation in the squared standardized residuals is undertaken at each attempt to remove a regressor. The default, list(lag = NULL, pval = 0.025), means the lag is chosen automatically (as max(arch) + 1) and that a p value of pval = 0.025 is used. If the list is NULL, then the squared standardized residuals z 2 t are not checked for serial correlation after each removal.
• vcov.type: NULL, "ordinary", "white" or "newey-west". If NULL (default), then the type of variance-covariance matrix is automatically determined (the option from the 'arx' object is used). If "ordinary", then the ordinary variance-covariance matrix is used. If "white", then the variance-covariance matrix of White (1980) is used. If "newey-west", then the variance-covariance matrix of Newey and West (1987) is used.
• keep: either NULL or an integer vector. If NULL (default), then no regressors are excluded from removal. Otherwise, the regressors associated with the numbers in keep are excluded from the removal space. For example, keep = 1 excludes the intercept from removal. Retaining variables using the keep argument implements the "theoryembedding" approach outlined in Hendry and Johansen (2015) by "forcing" theory variables to be retained while conducting model discovery beyond the set of forced variables.
• info.method: "sc", "aic" or "hq". If "sc" (default), then the information criterion of Schwarz (1978) is used as tiebreaker between the terminals. If "aic", then the information criterion of Akaike (1974) is used, and if "hq", then the information criterion of Hannan and Quinn (1979) is used.
As an example, the following code uses a lower significance level for the regressor significance tests and the PETs, and turns of diagnostic testing for ARCH in the standardized residuals: R> getsm05a <-getsm(mod05, t.pval = 0.01, arch.LjungB = NULL) Similarly, the following code restricts the mean intercept from being deleted, even though it is not significant: gets: General-to-Specific Modeling and Indicator Saturation R> getsm05b <-getsm(mod05, keep = 1)

getsv: Modeling the log-variance
GETS modeling of the log-variance specification is undertaken by applying the getsv function to an 'arx' object. For example, the following code performs GETS model selection of the log-variance specification of mod05 with default values on all the optional arguments:

R> getsv05 <-getsv(mod05)
Alternatively, the following code undertakes GETS model selection on the log-variance specification of the simplified model getsm05: R> mod06 <-arx(residuals(getsm05), arch = 1:3, asym = 2, vxreg = log(mX^2)) R> getsv06 <-getsv(mod06) Typing getsv06 prints the results, whose structure is organized in a similar way to getsm (see above). Note, though, that vconst, the log-variance intercept, is forced to enter the keep set when getsv is used. That is, α 0 is restricted from removal even if it is not significant. This is due to the estimation procedure, which is via the AR-representation. Finally, the main optional arguments of getsv are almost the same as those of getsm (see above). The main difference is that the only variance-covariance matrix available is the ordinary one, since the error-term of the AR-specification is iid. As an example of how to set some of the options to non-default values, the following code restricts the three log-ARCH terms (in addition to the log-variance intercept) from removal, and turns off diagnostic testing for serial correlation in the standardized residuals: R> getsv06b <-getsv(mod06, keep = 1:4, ar.LjungB = NULL)

Extraction functions
There are sixteen extraction functions available for 'gets' objects, i.e., objects produced by either getsm or getsv. These functions (most of them S3 methods) are: coef, ES, fitted, logLik, paths, plot, predict, print, recursive, residuals, rsquared, sigma, summary, terminals, VaR, vcov All, apart from paths and terminals, behave in a similar way to the corresponding extraction functions for 'arx' objects. In particular, coef, fitted, print and residuals automatically detect whether getsm or getsv has been used, and behave accordingly. The paths function extracts the paths searched, and terminals the terminal models.

Example: A parsimonious model of quarterly inflation
In Section 4.4, we showed that a log-ARCH(4)-X specification of the log-variance improved the fit and diagnostics of an AR(4)-X model of quarterly inflation. Here, we obtain a simplified version by using the getsm and getsv functions.
The estimation results of the AR(4)-X-log-ARCH(4)-X specification that we fitted was stored as an 'arx' object named inflMod02. The following code undertakes GETS modeling of the mean, and stores the results in an object named inflMod03:

R> inflMod03 <-getsm(inflMod02)
Next, typing inflMod03 prints the results (for brevity, only selected parts are reproduced): The final model contains the AR(1) and AR(4) terms, but no quarterly dummies. So the level of quarterly year-on-year inflation does not seem to depend on quarter. Note that, in Paths searched, regressor no. 5 (i.e., the AR(4) term) has a minus sign in front of it in all but one of the searched paths. This means the term has been re-introduced after deletion, since its deletion leads to a violation of one or several of the diagnostics tests. This is the reason the AR(4) term is retained even though it is not significant in the final model. Next, we use the residuals of the simplified model to develop a parsimonious model of the log-variance, storing the results in inflMod05: R> inflMod04 <-arx(residuals(inflMod03), arch = 1:4, + vxreg = inflData[, 2:4]) R> inflMod05 <-getsv(inflMod04, ar.LjungB = list(lag = 5, pval = 0.025)) Note that, to ensure that the diagnostic test for autocorrelation in the standardized residuals is undertaken at the same lag as earlier, the ar.LjungB argument has been modified. Next, typing inflMod05 prints the results, and again we only reproduce selected parts in the interest of brevity: The results suggest a high impact of the ARCH(1) and ARCH(2) terms -much higher than for financial returns, 5 and that the conditional variance depends on quarter. To obtain an idea of the economic importance of our results, we re-estimate the full, simplified model, and generate out-of-sample forecasts of the conditional standard deviation up to four quarters ahead. The full, simplified model is re-estimated using: R> inflMod06 <-inflMod06 <-arx(inflData[, "infl"], mc = TRUE, + ar = c(1, 4), arch = 1:2, vxreg = inflData[, 2:4], vcov.type = "white") In order to generate out-of-sample forecasts, we first need to generate the out-of-sample values of the retained quarterly dummies: R> newvxreg <-matrix(0, 4, 3) R> colnames(newvxreg) <-c("q2dum", "q3dum", "q4dum") R> newvxreg[2, "q2dum"] <-1 R> newvxreg[3, "q3dum"] <-1 R> newvxreg[4, "q4dum"] <-1 We can now generate the out-of-sample forecasts of the conditional standard deviations: R> set.seed(123) R> predict(inflMod06, n.ahead = 4, spec = "variance", newvxreg = newvxreg) The first command, set.seed (123), is for reproducibility purposes, since a bootstrap procedure is used to generate variance forecasts two or more steps ahead (the number of draws can be changed via the n.sim argument). The forecasts for 2016(1) to 2016(4) are: 2016 (1) 2016 (2)  In other words, the conditional variance is forecasted to be four times higher in 2016(1) than in 2016(4). This has notable economic consequences. For example, if the forecasted inflation in 2016(1) is 2%, then an approximate 95% prediction interval computed as 2 ± 2 × σ n+1 is given by the range 0% to 4%, which is large. By contrast, an approximate 95% prediction interval for 2016(4) computed as 2 ± 2 × σ n+4 is given by the range 1.1% to 2.9%, which is much tighter.

Example: A parsimonious model of daily SP500 volatility
In Section 4.5 we estimated a rich model of daily SP500 return volatility named sp500Mod01. Simplification of this model is straightforward with the getsv function. Since the model does not fully get rid of the ARCH in the standardized residuals, we will turn off the ARCH diagnostics. Also, for parsimony we will choose a small regressor significance level equal to 0.1%: R> sp500Mod03 <-getsv(sp500Mod01, t.pval = 0.001, arch.LjungB = NULL) In other words, no day-of-the-week dummies are retained and only the first ARCH-term is retained. However, three of the log-proxies are retained, i.e., the weekly, the monthly and the half-yearly, and both the lagged range-based volatility proxy and the lagged log-volume difference are retained. The log-likelihood is now −11131.4, and the following code computes the Schwarz (1978) information criterion value in terms of the average log-likelihood: R> info.criterion(as.numeric(logLik(sp500Mod03)), n = 8235, k = 7) The value is 2.71, so so the parsimonious model provides a better fit (according to sc) compared with the GUM (i.e., sp500Mod01).

Indicator saturation
Indicator saturation has been a crucial development in GETS modeling to address the distorting influence of outliers and structural breaks (changes in parameters) in econometric models. Such parameter changes are generally of unknown magnitudes and may occur at unknown times. Indicator saturation tackles this challenge by starting from a general model allowing for an outlier or shift at every point and removing all but significant ones using GETS selection. This serves both as a method to detect outliers and breaks, as well as a generalized approach to model mis-specification testing -if the model is well-specified, then no outliers/shifts will be detected. The function isat conducts multi-path indicator saturation to detect outliers and location-shifts in regression models using impulse indicator saturation (IIS -see Hendry et al. 2008, and Johansen and Nielsen 2016 for a comprehensive asymptotic analysis), step-indicator saturation (SIS -see Castle et al. 2015), trend-indicator saturation (TIS -as applied in Pretis, Mann, and Kaufmann 2015), and user-designed indicator saturation (UIS, or designed break functions in Pretis et al. 2016, andSchneider, Smerdon, Pretis, Hartl-Meier, andEsper 2017). Formulating the detection of structural breaks as a problem of model selection, a regression model is saturated with a full set of indicators which are then selected over using the general-to-specific getsm algorithm at a chosen level of significance t.pval. This approach to break detection imposes no minimum break length, and outliers can be identified jointly with structural breaks. The false-detection rate or gauge in IS is given by αk for k irrelevant indicators selected over, where k = n for IIS and TIS, and k = n − 1 for SIS if an intercept is forced. Thus, the false-detection rate can easily be controlled by reducing α at the cost of reduced power of detecting true shifts and outliers. To ensure a low false-detection rate, the rule of thumb of setting α = min(0.05, [1/k]) can be used, which yields one incorrectly retained indicator in expectation for large samples, and aims for a falsedetection rate below 5% in small samples. Figure 2 (and Table 8 in Appendix B) show the false-detection rate in IS using isat in a simple static simulation for increasing sample sizes.
The respective GUMs for a simple model of the mean of y t using impulse-, step-and trend-indicator saturation 6 are given by SIS GUM: IIS GUM: TIS GUM: where n denotes the total number of observations in the sample. Indicators are partitioned into blocks based on the values of the ratio.threshold and max.block.size arguments of the isat function, where the block size used is the maximum of given by either criterion. Indicators retained in each block are re-combined and selected over to yield terminal models. Additional regressors that are not selected over can be included through the mxreg argument, where autoregressive terms in particular, can be included using the ar argument. Naturally different indicators can be combined, by specifying both iis = TRUE and sis = TRUE selection takes place over both impulse-as well as step-indicators. The different regimes made up of indicators (e.g., retained step-functions or impulses) weighted by their estimated coefficients describe shifts in the intercept over time -the coefficient path of the intercept. While the detection of shifts in SIS is focused on time series analysis, IIS can be used in cross-sectional regression models to detect individual outliers (see e.g., Jiao and Pretis 2018).
The primary arguments for selection of indicators in isat carry over from the getsm function. The main differences and additional arguments are: • t.pval: numeric value between 0 and 1. The significance level α used for the two-sided t tests of the indicators in selection. The default is lower than in regular getsm model selection and set to 0.001 to control the number of false positives. Under the null of no outliers (or structural breaks), the irrelevance proportion or gauge (or proportion of spuriously retained indicators) is equal to αk where k is the number of indicators selected over. Thus setting α ≈ 1/k yields one spuriously retained indicator on average under the null.
• iis: logical, TRUE or FALSE. If TRUE, then a full set of impulse indicators is added and selected over.
• sis: logical, TRUE or FALSE. If TRUE, then a full set of step indicators is added and selected over.
• tis: logical, TRUE or FALSE. If TRUE, then a full set of trend indicators is added and selected over.
• uis: matrix object that contains designed break functions to be selected over.
6 Note that specifications of step-functions are possible in SIS. Here we specify the steps as in (8), and thus for interpretation every additional step is added to the previous ones. In contrast, the paper introducing SIS (Castle et al. 2015) works with step-indicators of the form n j=2 δj1 {t≤j} , in which case the steps have to be subtracted from the previous sum of steps to interpret the coefficients. • ratio.threshold: numeric, between 0 and 1. Minimum ratio of variables in each block to total observations to determine the block size, default equals 0.8. Block size used is the maximum of given by either the ratio.threshold and max.block.size.
• max.block.size: an integer of at least 2. Maximum size of block of variables to be selected over, default equals 30. Block size used is the maximum of given by either the ratio.threshold and max.block.size.
• parallel.options: either NULL or an integer. The integer denotes the number of cores to be used to search over blocks in parallel. If the argument is NULL then no parallel computation is used. This option can speed up computation when the number of blocks of indicators to be searched over is large.

Example: Structural breaks in the growth rate of UK SO 2 emissions
Annual emissions of the pollutant sulphur dioxide (SO 2 ) in the UK have declined in the latter half of the 20th century due to policy interventions and changes in energy production. Here we assess whether there have been significant shifts in the growth rate (∆ log(SO 2 ) t ) of sulphur dioxide emissions between 1946 and 2005, using SIS and the emission time series compiled by Smith, Van Aardenne, Klimont, Andres, Volke, and Delgado Arias (2011). Setting t.pval to 0.01 yields an approximate gauge of 0.01k under the null hypothesis of no shifts for k spuriously included variables. Inclusion of a full set of indicators implies that k = n for IIS, and k = n − 1 for SIS, and thus 0.01(n − 1) = 0.01 × 59. This suggests less than one indicator being retained spuriously on average in a well-specified model under the null of no shifts or outliers. Estimating an isat model using SIS (sis = TRUE is default): R> options(plot = TRUE) R> so2 <-data("so2data", package = "gets") R> yso2 <-zoo(so2data[, "DLuk_tot_so2"], order.by = so2data[, " year"]) R> (sis <-isat(yso2, t.pval = 0.01)) The above output shows multiple detected step-shifts (labeled sis1972-sis2004) in the time series. If plotting is active (plot = TRUE), isat also displays the output as in Figure 3 plotting the observed and fitted values, together with the coefficient path (the time-varying intercept through the regimes detected using SIS) as well as the standardized residuals. There is a downward step-shift detected in the growth rate in 1972, outlying observations are detected through two subsequent step-indicators with opposite-signs (e.g., in 1998/1999), as well as a downward step-shift at the end of the sample in 2004. This example demonstrates the flexibility of the SIS approach -step-shifts are easily identified even at the end of the sample while outliers can be detected simultaneously. The model can easily be extended to include autoregressive terms using the ar argument, for example we could estimate an AR(1) model with step-indicator saturation writing isat(yso2, ar = 1, t.pval = 0.01). Detection of outliers and structural breaks can be directly parallelized to increase computational speed when there are a large number of blocks searched over by setting the argument parallel.options equal to the number of cores available for processing. For example, isat(yso2, t.pval = 0.01, parallel.options = 2) estimates the above model in parallel using two cores.
Additional covariates can be included in an IS regression model by including them in the mxreg argument. If fixed regressors entering through mxreg induce perfect collinear with break functions in IS, then indicators are removed automatically before selection. For example, consider forcing a hypothesized step-shift in 1972 to be retained while simultaneously searching for additional shifts throughout the sample: R> x1972 <-zoo(sim(so2data[, " year"]) [, 26], order.by = so2data[, "year"]) R> isat(yso2, t.pval = 0.01, mxreg = x1972) The resulting estimation does not select over the fixed step-shift in 1972, though for this particular example the estimated terminal model with a forced step shift matches the SIS results of a general search.

Testing and bias correcting post-model selection in indicator saturation
The coefficient path describes how the value of a coefficient on a particular variable evolves over time. The coefficient path of the intercept of the 'isat' object can be extracted using the isatvar function. The function returns the coefficient path both as the time-varying intercept (const.path) and as deviation relative to the full-sample intercept (coef.path), together with the approximate variance of the coefficient path computed using the approach in Pretis (2017). When the model is specified to include autoregressive terms, then isatvar (setting lr = TRUE) also returns the static long-run solution of the dynamic model with its approximate variance.
Indicator saturation may result in an under-estimation of the error variance as observations are "dummied out" resulting in a truncation of the distribution of the error terms. The magnitude of this effect depends on the level of significance of selection and is generally small for low values of α. This effect manifests itself in an under-estimation of the error variance, and an under-estimation of the variance of regressors not selected over. Both can be corrected when using IIS through consistency and efficiency correction factors derived in Johansen and Nielsen (2016). These correction factors are implemented in gets as functions isvarcor which corrects the estimated error variance, and isvareffcor for an additional correction on the estimated variance of fixed regressors. The correction factors can be applied manually to estimation results, or specified as arguments (conscorr = TRUE and effcorr = TRUE) within the isatvar function. This is demonstrated below running IIS on an autoregressive model with one lag (ar = 1) on the growth rate of SO 2 emissions. The estimated variance of the coefficient path is higher once consistency and efficiency corrections are applied:

gets: General-to-Specific Modeling and Indicator Saturation
The terminal models of isat are the result of model selection, and may therefore lead to a selection bias in the coefficient estimates of selected variables. Post-selection bias-correction for orthogonal variables can be conducted using the method proposed in Hendry and Krolzig (2005). This is implemented as the function biascorr. Following Pretis (2017), biascorrection of the coefficients in a SIS model can be directly applied to the coefficient path without prior orthogonalization. Bias-correcting the coefficient path of the above model of the growth rate of SO 2 yields the one-and two-step bias-corrected coefficients: Bias-correction reduces the magnitude of the estimated coefficients slightly to account for potential selection bias. The function isattest makes it possible to conduct hypothesis tests on the coefficient path of the intercept of an 'isat' object. This test is described in Pretis (2017) and builds on Ericsson (2017) and Pretis et al. (2015) who use indicator saturation as a test for time-varying forecast accuracy. The main arguments of the isattest function are: • hnull: numeric. The null-hypothesis value to be tested against.
• lr: logical. If TRUE and the 'isat' object to be tested contains autoregressive terms, then the test is conducted on the long-run equilibrium coefficient path.
• ci.pval: numeric, between 0 and 1. The level of significance for the confidence interval and hypothesis test.
• conscorr: logical. If TRUE then the estimated error variance in IIS is consistencycorrected using the results in Johansen and Nielsen (2016).
• effcorr: logical. If TRUE then the estimated variance of fixed regressors in IIS is efficiency corrected using the results in Johansen and Nielsen (2016).
• biascorr: logical. If TRUE then the coefficient path is bias-corrected prior to testing. This is only valid for a non-dynamic (no auto-regressive terms) test without additional covariates.
Here we test the time-varying mean (as determined using SIS) of the annual growth rate of UK SO 2 emissions against the null hypothesis of zero-growth using isattest: R> isattest(sis, hnull = 0, lr = FALSE, ci.pval = 0.99, plot.turn = TRUE, + biascorr = TRUE) The results are shown in the automatically-generated plot given in Figure 4 (the plot.turn = TRUE argument automatically adds the break dates into the plot in the lower panel). When testing at 1% and using bias-correction this suggests that the detected shift in 1972 does not significantly move the growth-rate away from zero. Similarly, the upward shift in 2000 moves the growth rate back to zero. This change, however, is off-set by the shift at the end of the sample which shows the growth rate turning significantly negative in 2004.

Comparison of isat with other methods
Indicator saturation formulates the detection of breaks and outliers as a problem of model (or variable) selection. Here we first provide an overview of software implementing indicator saturation, followed by a discussion of isat in gets relative to other existing break detection packages.
The only other currently existing software implementing indicator saturation is Autometrics. IIS and SIS are available in both Autometrics and gets, however, a crucial difference within SIS is the construction and subsequent interpretation of step-indicators. In gets steps are constructed as forward-steps: S = 1 {t≥j} , j = 1, . . . , n , where 1 {t≥j} denotes the indicator function such that 1 {t≥j} = 1 for observations from j onwards, and zero otherwise. Thus the signs of the coefficients in the retained regression model in gets correspond to the direction of the step: positive (negative) coefficients imply an upward (downward) step, and the coefficient path begins with the regression intercept where for each subsequent regime the coefficient on the step indicator is added to the full sample intercept. Autometrics relies on backward-steps: S = 1 {t≤j} , j = 1, . . . , n and thus step-coefficients have to be interpreted as opposite-signed relative to the reported regression coefficients. Autometrics currently has no implementation of the computation of the coefficient path and its approximate variance, thus testing on the different regimes is non-trivial. This is directly implemented in gets by automatically plotting the coefficient path (if plot = TRUE), which can be extracted using isatvar. The variance estimates in Autometrics are currently not consistency or efficiency corrected when using IS. This is implemented in gets and -together with the extraction of the coefficient path and its variance -enables testing on the coefficient path using the isattest function, together with automatic bias-correction if specified. Further, automatic trend-indicator saturation (TIS) is currently only available in gets. Both Autometrics and gets enable the selection over designed break functions -through the argument uis in gets and the general more variables than observations model selection algorithm in Autometrics.
In the broader field of detection of breaks or changepoints, the main difference to existing methods (e.g., Bai and Perron 1998, Bai and Perron 2003, Perron 2006 implemented in strucchange by Kleiber, Hornik, Leisch, and Zeileis 2002) or detection of changepoints in general (as in the package changepoint -see Killick and Eckley 2014) is the model-selection approach to break detection in indicator saturation (for discussion of methodological differences see Castle et al. 2015, as well as Hendry et al. 2008, andNielsen 2016). This makes it possible to detect outliers (single period shifts) jointly with structural breaks (multiple period shifts), further it is also possible to detect breaks using designed functions (Pretis et al. 2016) which is not possible in conventional structural break methods or changepoint analysis.
Where the indicator saturation methodology overlaps in applications with existing methods is the detection of shifts in the intercept of time series regression models, for example using breakpoints in strucchange. Relative to strucchange and the Bai and Perron least-squares approach in changes in the mean, isat in gets does not impose a minimum break length and can therefore conduct outlier detection jointly with shifts in the intercept, further there is no implicit upper limit on the number of breaks, and it is thus possible to identify outliers or shifts in the mean at the start or end of samples as no trimming is required. Changes in regression coefficients on random variables can be detected in isat using designed break functions through the uis argument by interacting a full set of step-indicators with the random variable. This, however, is computationally expensive as each additional variable whose coefficient is allowed to break over time adds a set of n variables to be selected over the GUM. The function breakpoints in strucchange estimates a pure structural change model where all coefficients change, isat in gets is a partial model where the coefficients on variables included through mxreg are not allowed to break, and only breaks in the mean (or specified coefficients through inclusion in uis) are permitted -making it possible to pre-specify constancy. A partial structural change model using the Bai and Perron leastsquares approach can be estimated using available MATLAB code (available online at http: //people.bu.edu/perron/code.html).
Relative to changepoint, isat in gets is focused on regression modeling and structural breaks in the intercept of regression models jointly with outlier detection. As the authors of changepoint themselves note, changepoint does not focus on changes in regression models. The function isat directly enables the inclusion of covariates through mxreg or ar within isat, only if no additional covariates are specified then isat searches for changes in the mean of a time series as in the models used in the changepoint package while, however, simultaneously detecting outliers.

Exporting results to EViews, Stata and L A T E X
The two most popular commercial econometric software packages are EViews (IHS Markit 2017) and Stata (StataCorp 2017), but none of these provide GETS modeling capabilities. To facilitate the usage of GETS modeling for EViews and Stata users, we provide two functions for this purpose, eviews and stata. Both functions work in a similar way, and both can be applied on either 'arx', 'gets' or 'isat' objects. For example, typing eviews(getsm05) yields the following print output: EViews code to estimate the model: equation getsm05.ls(cov = white) yy mxreg4 R code (example) to export the data of the model: eviews(getsm05, file = C:/Users/myname/Documents/getsdata.csv ) In other words, the code to estimate the final model in EViews, and -if needed -a codesuggestion for how to export the data of the model. The need to export the data of the final model is likely to be most relevant subsequent to the use of isat. The stata function works similarly. Note that both the eviews and stata functions are only applicable to conditional mean specifications, since neither EViews nor Stata offer the estimation of dynamic log-variance models.
The objects returned by arx, getsm, getsv and isat are lists. The entries in these lists that contain the main estimation output are objects of class 'data.frame'. That means the R package xtable of Dahl (2016) can be used to generate L A T E X code of the data frames.

Conclusions
The R package gets provides a toolkit for general-to-specific modeling through automatic variable selection in regression specifications of the mean and the variance, as well as indicator saturation methods to detect outliers and structural breaks. Starting with a general candidate set of variables unknown to be relevant or irrelevant, selection using getsm or getsv can yield parsimonious terminal models that satisfy a set of chosen diagnostic criteria, where parameter changes and outlying observations are detected using isat. Table 4 contains the list of experiments. The design of the experiments HP1, HP2' and HP7' are based on Hoover and Perez (1999, see Table 3 on p. 174), and make use of their data x HP 1t , . . . , x HP 36t . It should be noted that there are two typos in their Table 3. The value (7/4) should instead be √ 7/4 in the model of the autoregressive error, and the value 6.73 should instead be 6.44 in model 7', see also Doornik (2009). The number of relevant variables in the GUM is k rel , the number of irrelevant variables in the GUM is k irr and the total number of variables (the constant included) in the GUM is k = k rel + k irr + 1. Nominal regressor significance level used is 5%, and 1000 replications. The term m(k rel /k rel ) is the average proportion of relevant variablesk rel retained relative to the actual number of relevant variables k rel in the DGP. The term m(k irr /k irr ) denotes the average proportion of irrelevant variablesk irr retained relative to the actual number of irrelevant variables k irr in the GUM. The estimatek irr includes both significant and insignificant retained irrelevant variables (this is in line with Hendry and Krolzig (2005), and Doornik (2009), but counter to HP which only includes significant irrelevant variables in the estimate).p(DGP) is the proportion of times the DGP is found exactly. The properties of the HP algorithm are from Hoover and Perez (1999, Figure 1 on p. C39), and the properties of the Autometrics algorithm are from Doornik (2009, Section 6). For AutoSEARCH, a constant is included in all the regressions but ignored in the evaluation of successes and failures (this is in line with Hoover and Perez (1999) but counter to Hendry and Krolzig (2005), and Doornik (2009)), in the diagnostic checks both the AR and ARCH test of the standardized residuals were undertaken at lag 2 using a significance level of 2.5% for each, and as tiebreaker the Schwarz information criterion is used with a Gaussian log-likelihood made up of the standardized residuals of the mean specification.

B. Simulation tables
Tables 5, 6, 7 and 8 present the simulation results comparing gets to alternative variable selection methods, and the properties of isat under the null of no breaks.  Table 8: Gauge (false-detection rate) in IIS, SIS, TIS in isat under the null of no structural breaks or outliers for varying sample sizes n at nominal selection significance of α = 1% using a static DGP of y t = u t where u t ∼ N (0, σ 2 ) with 1000 replications.