karma.boxjenkins: Box-Jenkins method for ARMA model selection on a stationary...

Description Usage Arguments Value See Also Examples

Description

Box-Jenkins method for ARMA model selection on a stationary process.

Usage

1
2
3
karma.boxjenkins(y, diffs = 0, log = F, fixed = F, xreg = NULL,
  N = 100, box_test = F, max_ar = 20, max_ma = 20, max_conv = 2,
  max_iter = 200, plot = F, stdout = T)

Arguments

y

A univariate time-series vector; type <numeric> or <ts>.

diffs

Differencing step: Indicates whether the input series needs to be differenced for stationarity (and to what degree); 0,1,...,n; type <int>.

log

Logarithmic transformation flag. Indicates whether the input series needs to be log-transformed for stationarity; T, F; type <logical>.

fixed

Fixed term flag. Indicates whether the fixed term option in Arima() needs to be switched on during model selection; T, F; type <logical>.

xreg

Optional vector or matrix of exogenous regressors; see documentation for Arima(), package 'forecast'.

N

Maximum lag at which to calculate autocorrelation and partial autocorrelatin functions; see documentation for acf(), pacf().

box_test

T/F flag. Indicates whether or not a Box-Pierce test for autocorrelation should be performed at every algorithm iteration.

max_ar

Maximum AR term (value of p).

max_ma

Maximum MA term (value of q).

max_conv

Maximum number of iterations without improvement before the algorithm converges forcefully (stuck to a local optimum).

max_iter

Maximum number of iterations without improvement before the algorithm converges naturally (reached a global or local optimum).

plot

Option to depict plots during local search; if TRUE (default), AC and PAC plots are active. <logical>

stdout

Option to output optimisation diagnostics during local search; <logical>

Value

Object of class "karma.fit"; (extends class "Arima" from package 'forecast').

See Also

tseries, forecast

Examples

1
2
3
4
5
6
# Find transformation steps required for stationarity:
stationarity.options <- karma.transform(ldeaths, stdout = F, autolog = F, autodiffs = 1)
# Apply Box-Jenkins method on the stationary series:
boxj.fit <- karma.boxjenkins(ldeaths, diffs = stationarity.options$diffs, log = stationarity.options$log)
# Apply cross-validation and calculate MAPE on out-of-sample (test) data:
karma.cv(boxj.fit)

snarf-snarf/karma documentation built on May 24, 2019, 7:19 a.m.