Plots forecasts of a time series using a previously fitted ARIMA (G. Tunnicliffe Wilson & S.J. Welham).
||Probability value used for forecast limits; default 0.9|
||What type of graphics to use (
||Window to be used for plotting; default 1|
||The three pens to be used (after being defined appropriately) for drawing the plots; default
||Variates holding the time series to be used for producing forecasts|
||Specifies the units to be used from each series: a scalar
||ARIMA model to be used for forecasting|
||The first and second elements of each variate specify respectively the first and last time index, relative to the whole series, of the range to be forecast|
||The time of the latest observation to be used to construct forecasts with increasing leadtimes for each series; if
||The fixed leadtime to be used to construct forecasts if
||Save the values of the constructed forecasts|
||Save the lower limits of the forecasts|
||Save the upper limits of the forecasts|
||Save the standardized forecast errors, available only for
For a time series variate, given by the
BJFORECAST plots forecasts calculated from a previously fitted ARIMA model, specified by the
TSM parameter. The set of time points for which forecasts are produced is defined by setting the
TIMERANGE parameter to a variate of length 2 holding the first and last time index. If only part of the series is to be used to initialize for forecasting, this is specified by setting parameter
LENGTH, either to a scalar
N to indicate that the first
N values are to be used, or to a variate of length 2 holding the positions of the first and last units to be included. The procedure also prints a description of the series, and details of the model involved in the initialization for forecasting.
There are two options to control the type of forecasting. Setting the
ORIGIN parameter to a scalar indicates that forecasts are calculated from this time point (at increasing leadtimes) for the range of future times specified by the
TIMERANGE parameter. Alternatively, if
ORIGIN is unset, it is possible to produce forecasts with a fixed leadtime, by setting the parameter
LEADTIME to the required value. If neither
LEADTIME are set, a default origin is taken, namely the last element before the time range to be forecast. Where possible, the values of the supplied series are also plotted for comparison. If one-step-ahead forecasts are requested (fixed leadtime set to 1), the standardized forecast errors are plotted as a tracking signal for use in checking the continuing adequacy of the model.
FORECAST parameter can be used to save the calculated forecasts in a variate and parameters
UPPER can save the lower and upper confidence limits for these forecasts. If the forecasts are from a fixed leadtime of 1, the standardized forecast errors can be saved in a variate given by parameter
SFE; because of the way in which the standard errors are calculated, the last value of this variate is always missing. The
PROBABILITY option indicates the probability value to be used for the confidence limits, with 0.9 as the default value.
GRAPHICS controls whether plots are produced for line printer or for the current high-resolution graphics device; by default high-resolution plots are produced. The window to be used for high-resolution plots is specified by the
WINDOW option; by default
FRAME directive can be used to set the attributes of this window before calling the procedure, and these will be unchanged on leaving the procedure. The
PENS option controls which pens are to be used for the plots; the attributes of these pens are modified within the procedure. By default pens 1-3 are used, but these can be changed by setting option
PENS to a variate of length 3 containing the numbers of the three different pens required.
The values of the supplied series values, up to the origin, are used to initialize for forecasting (by residual regeneration), and the forecasts are then constructed over the requested time range. If fixed leadtime forecasts are required, the origin is successively updated for each forecast.
The input and output structures must not be restricted. Restriction of the input series to a contiguous set of units can be achieved using the
Commands for: Time series.
CAPTION 'BJFORECAST example',!t(\ 'Data from Andrews & Herzberg (1985), Data, A Collection',\ 'of Problems from Many Fields for the Student and Research',\ 'Worker, Springer-Verlag, pp. 369-370.'); STYLE=meta,plain VARIATE [VALUES= 8.075,7.819,7.366,8.113,7.380,7.134,7.222,7.768,\ 7.386,6.965,6.478,8.105,8.060,7.684,7.580,7.093,\ 6.129,6.026,6.679,7.414,7.112,7.762,7.645,8.639,\ 7.667,8.080,6.678,6.739,5.569,5.049,5.642,6.808,\ 6.636,8.241,7.968,8.044,7.791,7.024,6.102,6.053,\ 5.941,5.386,5.811,6.716,6.923,6.939,6.705,6.914] Profit TSM Model; ORDERS=!(2,0,1,0,1,1,4);\ PARAMETERS=!(1,-0.0928,0.1911,1.5650,-0.8474,0.9988,0.9111) CAPTION !t('Use BJFORECAST for series Profit based on times 1-40 and',\ 'ARIMA model Model to produce forecasts for times 41-56.') BJFORECAST Profit; TSM=Model; TIMERANGE=!(41,56) CAPTION !t('Use BJFORECAST to produce one-step ahead forecasts based',\ 'on Model for series Profit at time points 41-50.') BJFORECAST Profit; TSM=Model; TIMERANGE=!(41,50); LEADTIME=1