Moving-average MA(q) model
Usage
model_ma(
data,
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.
- 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 failsmodel_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
FALSEalongside a custom prior.
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_ma(x, q = 1)
#> <corehydro_model> time_series/ma