isatloop: Repeated Impulse Indicator Saturation

View source: R/gets-isat-source.R

isatloopR Documentation

Repeated Impulse Indicator Saturation

Description

Runs isat repeatedly at pre-specified significance levels to yield multiple iterations used in
outlierscaletest.

Usage

  isatloop(num=c(seq(from=20, to=1, by=-1)), t.pval.spec = FALSE,  
  print=FALSE, y, ar=NULL, iis=TRUE, sis=FALSE, ...)
  

Arguments

num

numeric, target expected number of outliers under the null hypothesis, or target proportion of outliers if t.pval.spec==TRUE

t.pval.spec

logical, if TRUE, then num specifies proportion rather than number of targeted outliers

print

logical, if TRUE, then iterations are printed

y

numeric vector, time-series or zoo object. Missing values in the beginning and at the end of the series is allowed, as they are removed with the na.trim command

ar

integer vector, say, c(2,4) or 1:4. The AR-lags to include in the mean specification

iis

logical, whether to use iis

sis

logical, whether to use sis, default is FALSE

...

any argument from isat can also be used in isatloop

Details

The function repeatedly runs isat detecting outliers in a model of y at different chosen target levels of significance speciefied in num. The output of this function is used as the input for the outlierscaletest function. All additional arguments from isat can be passed to isatloop.

Value

Returns a list of two items. The first item is the number of observations. The second item is a dataframe containing the expected and observed proportion (and number of outliers) for each specified significance level of selection.

Author(s)

Felix Pretis, https://felixpretis.climateeconometrics.org/

References

Jiao, X. & Pretis, F. (2019). Testing the Presence of Outliers in Regression Models. Discussion Paper.

Pretis, F., Reade, J., & Sucarrat, G. (2018). Automated General-to-Specific (GETS) regression modeling and indicator saturation methods for the detection of outliers and structural breaks. Journal of Statistical Software, 86(3).

See Also

isat, outlierscaletest

Examples

  ###Repeated isat models using the Nile dataset
  ### where p-values are chosen such that the expected number of outliers under the null
  ### corresponds to 1, 2, 3, 4 and 5.
  nile <- as.zoo(Nile)
  isat.nile.loop <- isatloop(y=nile, iis=TRUE, num=c(1,2, 3, 4, 5))
  

gets documentation built on Sept. 11, 2024, 9:03 p.m.