Skip to contents

Fucntion to apply the ARIMAX workflow to each orgUnit in a dataset

Usage

fit_arima(
  cv_set,
  y_var,
  pred_vars,
  quantile_levels = c(0.01, 0.025, seq(0.05, 0.95, by = 0.05), 0.975, 0.99),
  log_trans = FALSE
)

Arguments

cv_set

list containing analysis and assessment data.frames. One element of the output of split_cv_rolling().

y_var

character string of y variable label

pred_vars

vector string of column names of predictor variables. Note that static variables cannot be included in an ARIMAX model and will be automatically removed.

quantile_levels

numeric vector of quantiles to use in prediction intervals. Range 0-1. Default: c(0.01, 0.025, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 0.975, 0.99)

log_trans

whether to log transform the data to help with fit. Uses log(y+1). Default = FALSE

Value

data.frame of prediction intervals on analysis and assessment data