isat
function undertakes multi-path indicator saturation to detect outliers and mean-shifts using impulses (IIS), step-shifts (SIS), or both. Indicators are partitioned into blocks and selected over at a chosen level of significance (t.pval
) using the getsm
function.isat(y, mc=TRUE, ar=NULL, ewma=NULL, mxreg=NULL, iis=TRUE, sis=FALSE,
blocks=NULL, ratio.threshold=0.8, max.block.size=30,
vcov.type=c("ordinary", "white"), t.pval=0.001, do.pet=FALSE,
wald.pval=0.001, ar.LjungB=NULL, arch.LjungB=NULL, normality.JarqueB=NULL,
info.method=c("sc", "aic", "hq"), include.gum=FALSE, include.empty=FALSE,
tol=1e-07, LAPACK=FALSE, max.regs=NULL, verbose=TRUE, print.searchinfo=TRUE,
alarm=FALSE, plot=TRUE)
eqwma
function. In the latter case a lagged moving average of y is included as a regressorzoo
object, of conditioning variables. Note that missing values in the beginning or at the end of the series is allowed, as they are removed with the
lag
and pval
, or NULL (default). In the former case lag
contains the order of the Ljung and Box (1979) test for serial correlation in the standardised residuals, and pval
contalag
and pval
, or NULL (default). In the former case, lag
contains the order of the Ljung and Box (1979) test for serial correlation in the squared standardised residuals, and pval
NULL
, then no test for non-normality is undertakenqr
function). Only used if LAPACK is FALSE (default)qr
function)gets.m
function. Retained indicators in each block are combined and re-selected over. Fixed covariates that are not selected over can be included in the regression model either in the mxreg matrix, or for auto-regressive terms through the ar specification. See Santos et al. (2007) and Doornik et al. (2013)coef.gets
, fitted.gets
, paths
, plot.gets
, print.gets
,
residuals.gets
, summary.gets
, terminals
, vcov.gets
Related functions: arx
, eqwma
, leqwma
, zoo
##SIS using the Nile data
data(Nile)
isat(Nile, sis=TRUE, iis=FALSE, plot=TRUE, t.pval=0.005)
##SIS using the Nile data in an autoregressive model
isat(Nile, ar=1:2, sis=TRUE, iis=FALSE, plot=TRUE, t.pval=0.005)
##HP Data
##load Hoover and Perez (1999) data:
data(hpdata)
##make quarterly data-matrix of zoo type
##(GCQ = personal consumption expenditure):
y <- zooreg(hpdata$GCQ, 1959, frequency=4)
##transform data to log-differences:
dlogy <- diff(log(y))
##run isat with step impulse saturation on four
##lags and a constant 1 percent significance level:
isat(dlogy, ar=1:4, sis=TRUE, t.pval =0.01)
Run the code above in your browser using DataLab