Skip to contents

ARIMA(p, d, q) model

Usage

model_arima(
  data,
  p = 1L,
  d = 0L,
  q = 1L,
  include_intercept = TRUE,
  transform = NULL,
  training_time_steps = NULL,
  parameters = NULL,
  parameter_values = NULL,
  use_default_flat_priors = NULL
)

Arguments

data

numeric vector of the observed series, in sequence order.

p

autoregressive order.

d

differencing order.

q

moving-average order.

include_intercept

logical; include an intercept term.

transform

optional variance-stabilizing transform: "None", "Logarithmic", "BoxCox", or "YeoJohnson".

training_time_steps

number of leading steps used for calibration, the rest held back for validation. The model default is max(30, floor(0.8 * n)), which exceeds the series length for any series shorter than 30 and then fails model_validate(); set it explicitly for a short series.

parameters

optional model_parameter() object or list of them, setting bounds, fixed flags, priors, or starting values.

parameter_values

optional numeric vector of all parameter values, applied last.

use_default_flat_priors

logical; set FALSE alongside a custom prior.

Value

An object of class corehydro_model.

See also

Examples

x <- c(10.2, 11.5, 9.8, 12.1, 13.4, 11.9, 10.6, 12.8, 14.0, 13.1, 11.7, 12.5)
model_arima(x, p = 1, d = 0, q = 1)
#> <corehydro_model> time_series/arima