Apply sequential ARIMA pipeline
seqarima.RdApplies a pipeline of (1) differencing, (2) autoregressive (AR) modeling, (3) moving average smoothing, and (4) band-pass filtering.
Arguments
- ts
A time series (`ts`) object.
- d
Differencing order. Use 0 for no differencing, or 'auto' for KPSS-based auto-differencing.
- p
AR order. Can be a single integer or a vector for ensemble.
- q
MA order. Can be a single integer or a vector for ensemble.
- fl
Lower frequency bound for band-pass filter.
- fu
Upper frequency bound for band-pass filter.
- ar.aic
Logical. Whether to use AIC-based AR model selection.
- ar.collector
Collector for AR ensemble. One of 'mean', 'median', or 'pca'.
- ma.collector
Collector for MA ensemble. One of 'mean', 'median', or 'pca'.
- ar.args
A named list of additional arguments to be passed to the `Autoregressive()` function. This allows customization of the AR stage beyond standard parameters used in `burgar()`, etc. These arguments are merged with the core inputs via `do.call()`.
- ma.args
A named list of additional arguments to be passed to the `MovingAverage()` function. This enables optional customization of the MA stage, for example by supplying `w.func`, custom weights, or smoothing parameters. Like `ar.args`, these are passed using `do.call()`.
- bp.args
A named list of additional arguments to be passed to the `BandPass()` function. This enables optional customization of the MA stage, for example by supplying `resp` and `filt_order`, custom filter configurations.
- return.step
Logical. If TRUE, intermediate stages are returned.
- verbose
Logical. If TRUE, messages are printed during execution.
Examples
if (FALSE) { # \dontrun{
# Generate noisy sinusoid
set.seed(123)
fs <- 1024
t <- seq(0, 1, by = 1 / fs)
x <- sin(2 * pi * 60 * t) + rnorm(length(t), sd = 0.5)
ts_obj <- ts(x, start = t[1], frequency = fs)
# Apply sequential ARIMA pipeline
out <- seqarima(
ts_obj,
d = 1,
p = c(50, 100, 150),
q = 20,
fl = 30,
fu = 300,
ar.collector = "median",
ma.collector = "mean",
return.step = TRUE,
verbose = FALSE
)
# Plot result
plot(out, main = "Output of seqarima()")
# View AR model metadata
attr(out, "meta")$ar_feat
} # }