Skip to contents

ARIMAX(p, d, q, b) model with covariates

Usage

model_arimax(
  data,
  covariates,
  p = 1L,
  d = 0L,
  q = 0L,
  b = 0L,
  include_intercept = TRUE,
  transform = NULL,
  trend_type = NULL,
  include_seasonality = 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.

covariates

a list of numeric vectors (one per covariate series), or a matrix with one covariate per column.

p

autoregressive order.

d

differencing order.

q

moving-average order.

b

the covariate lag order.

include_intercept

logical; include an intercept term.

transform

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

trend_type

optional deterministic trend: "None", "Linear", "Quadratic", or "Cubic".

include_seasonality

logical; include seasonal terms.

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)
z <- c(1.1, 1.4, 0.9, 1.6, 1.8, 1.5, 1.0, 1.7, 1.9, 1.8, 1.3, 1.6)
model_arimax(x, covariates = list(z), p = 1, d = 0, q = 0, b = 0)
#> <corehydro_model> time_series/arimax