A row or a column vector
with T elements, which contains the time series. Note that
y may contain missing values. If y is a timetable then
times of the timetable are shown in the plot of y and
fitted values.
Data Types: double or timetable
Specify optional comma-separated pairs of Name,Value arguments.
Name is the argument name and Value
is the corresponding value. Name must appear
inside single quotes (' ').
You can specify several name and value pair arguments in any order as
Name1,Value1,...,NameN,ValueN.
Example:
'bsb',1:round(T/0.7): T=length(y);
, 'conflev',0.999
, 'lambda',1000;
, 'predint',"all";
, 's',52;
, 'sigma2_eps',20;
, 'ig_a0',10;
, 'ig_a0',10;
, 'plots',true;
Indices of observed points used in the conditioning.
If bsb is empty the the first 80 per cent units are used
Example: 'bsb',1:round(T/0.7): T=length(y);
Data Types: double
A number between 0 and 1 which defines the confidence
level which is used to produce the bands. The default
value of conflev is 0.99.
Example: 'conflev',0.999
Data Types: double
The greater is the value of lambda the greater is the degree of
smoothness which is used to estimate the trend. The default
value of lambda which is used depends on the periodicity of the
series (see optional input parameter s).
If lambda is empty (default) the value of lambda
which is used depends on the Ravn–Uhlig scaling rule (adjust by
the 4th power of the observation frequency ratio):
\[
\lambda(s)=1600(s/4)^4
\]
where $s$ is the number of observations per year
Therefore, lambda=1600 for quarterly data, lambda=129600
for monthly data...
Example: 'lambda',1000;
Data Types: double or empty.
String which specifies for which units to compute the variance
of the prediction interval, that is the variance of the
estimated trend plus the variance of the estimated noise
component. If predint="nobsb" variance of the prediction is
computed just for the units not beloing to bsb. If predint is
"all" variance of the prediciton interval is computed for all
the units. If predint="" variance of prediction interval is
not computed.
Example: 'predint',"all";
Data Types: string or empty.
For monthly data s=12 (default), for quarterly data s=4,
Example: 's',52;
Data Types: double or empty.
If sigma2_eps is a string possible
values are: "MLaug" "MAPjef" "MAPig" "dfREML".
Given:
$RSS=||y_{bsb} - S \hat m||^2$.
and Qhat:
$\hat Q =RSS + \lambda ||D \hat m||^2$;
$K = n_{bsb} + (n-2)$;
$MLaug= ML (augmented) = \hat Q /K$.
MAPjef= MAP (maximum a posteriori estimate) with Jeffreys prior.
$MAPjef=\hat Q / (K+2)$.
MAPig = MAP (maximum a posteriori
estimate) with inverse gamma prior with parameters a0 and b0.
$MAPig= (b_0 + 0.5\hat Q)/(a_0 + 1 + 0.5K)$.
dfREML = df-REML-like (marginal smoother likelihood).
$dfREML=RSS / (nbsb - df(lambda))$.
$df(lambda)=trace(H)
= trace(S A^{-1} S') = trace(A^{-1} S' S) = trace(A^{-1} W)$.
The estimate of the $trace(A^{-1} W)$ is via Hutchinson:
$tr(M) ≈ (1/niter) \sum_{i=1}^{niter} z'_i M z_i$.
$z_i$ are Rademacher random. $niter$ is fixed to 50.
variables, equal to +1 or −1 with equal probability.
On the other hand, if sigma2_eps is a numeric scalar it is
possible to supply the prior value.
Example: 'sigma2_eps',20;
Data Types: string or scalar double.
Prior value of parameter a of the inverse gamma to be used
in case sigma2_eps="MAPig".
Example: 'ig_a0',10;
Data Types: scalar double.
Prior value of parameter b of the inverse gamma to be used
in case sigma2_eps="MAPig".
Example: 'ig_a0',10;
Data Types: scalar double.
If plots = true a plot with the real time series with fitted
values and trend estimate will appear on
the screen. This plot is tagged forecastTS.
The confidence bands which are shown depend on the input option
predint.
The default value of plot is 0, that is no plot is shown on
the screen.
Example: 'plots',true;
Data Types: logical.