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.
|