arguments.regressors {BTSR} | R Documentation |
Shared documentation for regressors
Description
This is the common documentation for arguments related to the regressors.
Arguments
xreg |
optional; external regressors. Can be specified as a vector, a
matrix or a list. Default is |
xnew |
optional; |
xreg.start |
optional; initial value for the regressors (to initialize
recursion). Can be specified as a vector or a list. Default is
|
xregar |
a length 1 or 2 logical vector indicating whether |
Regressors format
In-sample (xreg
) and out-of-sample values (xnew
) for regressors can be
provided in two formats
-
Legacy structure: a vector or matrix. Internally
xreg
is converted toxreg = list(part1 = xreg, part2 = NULL)
. The same applies toxnew
-
New structure: a list with elements
part1
(regressors for first model component) andpart2
(regressors for second model component), each being a vector or matrix.
xreg.start
can be provided in two formats
-
Legacy structure: a vector with initial values for each regressor. Internally
xreg.start
is converted toxreg.start = list(part1 = xreg.start, part2 = NULL)
. -
New structure: a list with elements
part1
andpart2
, each a vector of initial values for the respective regressors.
The following rules apply to xreg
, xnew
and xreg.start
if
model
corresponds to a case where\nu
is constant over time (e.g.,model = "BARMA"
),part2
is ignored.For simulation, regressors must include
n + burn
observations.For model fitting, parameter initialization, or component extraction, the number of regressor observations must match the length of the observed time series
yt
.When
xreg = NULL
ornnew = 0
,xnew
is ignored. Ifnnew > 0
and the number of regressors inxnew
does not matchxreg
an error message is issued.If starting values for
xreg
are not provided andp_i > 0
for thei
th part of the model, the default behavior is to assume\displaystyle\boldsymbol{X}_t = \frac{1}{p_i}\sum_{k = 1}^{p_i} \boldsymbol{X}_k, \quad \text{for } t< 1.