Stats Master VCL
|
rst estimate Alpha parameters by single smoothing and then use returned value to forecast up to T periods.
Parameters |
Description |
Y |
Time series data set. |
YHat |
Time series forecasts. Size of the YHat vector are adjusted automatically. |
Alpha |
Overal smoothing parameter used for forecast. |
T |
Forecast values up to T period. |
MSE |
MSE, evaluated at minimum. |
InitMethod |
Defines how the initial values for S[0] are calculated. |
Use this routine if you don't know the best estimates for Alpha.
Do estimation and forecasting in single routine call.
Uses MtxExpr, StatTimeSerAnalysis, Math387; procedure Example; var Data,YHat: Vector; Alpha: 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 Alpha estimate = 0.6 Alpha := 0.6; SingleExpForecast(Data,YHat,Alpha,T,MSE,0); // returs MSE and estimated Alpha (from MLE) end;
#include "MtxExpr.hpp" #include "Math387.hpp" #include "StatTimeSerAnalysis.hpp" void __fastcall Example(); { sVector Data,YHat; int NumPoints = 20; Data.LoadFromFile("aerosol_particles.vec"); // last point period = Data.Length-1 + NumPoints int T = Data.Length-1+NumPoints; // initial alpha estimate = 0.6 double alpha = 0.6; double mse; SingleExpForecast(Data,YHat,alpha,T,mse,0); // returs mse and estimated Alpha (from MLE) }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|