Overload List
| # | Signature | Description |
|---|---|---|
| 1 | procedure DoubleExpForecast(const Y: TVec; const YHat: TVec; const Alpha: Double; const Gamma: Double; const T: Integer; const InitMethod: Integer); | Double exponential forecast. |
| 2 | procedure DoubleExpForecast(const Y: TVec; const YHat: TVec; var Alpha: Double; var Gamma: Double; const T: Integer; out MSE: Double; const InitMethod: Integer); | First estimate Alpha and Gamma parameters by double smoothing and then use returned values to forecast up to T periods. |
Overload 1: procedure DoubleExpForecast(const Y: TVec; const YHat: TVec; const Alpha: Double; const Gamma: Double; const T: Integer; const InitMethod: Integer);
Double exponential forecast.
| # | Name | Description |
|---|---|---|
| 1 | Y | Time series data set. |
| 2 | YHat | Time series forecasts. Size of the YHat vector are adjusted automatically. |
| 3 | Alpha | Overal smoothing parameter used for forecast. |
| 4 | Gamma | Trend smoothing parameter used for forecast. |
| 5 | T | Forecast values up to T period. |
| 6 | InitMethod | Defines how the initial values for b[0] are calculated. |
Result: stored in self (calling object)
Remarks:
Forecasts time series values by using double exponential smoothing equations. For double exponential smoothing, the h period ahead forecast is given by:
Examples
Uses MtxExpr, StatTimeSerAnalysis, Math387;
procedure Example;
var Data,YHat: Vector;
Alpha,Gamma: double;
T, NumPoints: Integer;
begin
NumPoints := 20;
Data.LoadFromFile('aerosol_particles.vec');
// last point period = Data.Length-1 + NumPoints
T := Data.Length-1+NumPoints;
// initial estimates for Alpha, Gamma
Alpha := 0.1;
Gamma := 0.1;
DoubleExpForecast(Data,YHat,Alpha,Gamma,T,MSE,1);
// returs MSE and estimated Alpha (from MLE)
end;
See Also: StatTimeSerAnalysis.DoubleExpSmooth
Overload 2: procedure DoubleExpForecast(const Y: TVec; const YHat: TVec; var Alpha: Double; var Gamma: Double; const T: Integer; out MSE: Double; const InitMethod: Integer);
First estimate Alpha and Gamma parameters by double smoothing and then use returned values to forecast up to T periods.
| # | Name | Description |
|---|---|---|
| 1 | Y | Time series data set. |
| 2 | MSE | MSE, evaluated at minimum. |
| 3 | YHat | Time series forecasts. Size of the YHat vector are adjusted automatically. |
| 4 | Alpha | Overal smoothing parameter used for forecast. |
| 5 | Gamma | Trend smoothing parameter used for forecast. |
| 6 | T | Forecast values up to T period. |
| 7 | InitMethod | Defines how the initial values for b[0] are calculated. |
Result: stored in self (calling object)
Remarks:
Use this routine if you don't know the best estimates for Alpha and Gamma.