StatTimeSerAnalysis::ARIMASimulate Function

void ARIMASimulate(TVec *p, TVec *t, const int d, TVec *ResInit, const int n, TVec *aResult);

Simulate the ARIMA process.

#NameTypeDescription
1pTVec *stores the AR coefficients. Length of the p vector defines AR(p) order.
2tTVec *stores the MA coefficients. Length of the t vector defines MA(q) order.
3dconst intdefines how many times time series is differentiated (d parameter in ARIMA).
4ResInitTVec *defines initial values for integration: r[-d+1],Dr[-d+2],...,D^(d-1)r[0]. The length of ResInit must be equal to d, otherwise an exception will be raised.
5nconst intdefines number of points to simulate.
6aResultTVec *returns ARIMA (p,d,q) time series. Size of Result vector is adjusted automatiacally.
Remarks:

Simulate the ARIMA (p,d,q) process.

Examples
#include "MtxExpr.h"
#include "Units.StatTimeSerAnalysis.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Stats;
using namespace Dew::Stats::Units::StatTimeSerAnalysis;

void Example()
{
    Vector phi(0);
    Vector theta(0);
    Vector init(0);
    Vector ts(0);
    phi.SetIt(false, DewArray<double>{1.0});
    theta.SetIt(false,DewArray<double>{-0.25});
    init.SetIt(false,DewArray<double>{0.0, 0.0});
    ARIMASimulate(phi,theta,2,init,100,ts);
    // ts now stores 100 points from ARIMA(1,2,1) process.
}
See Also: StatTimeSerAnalysis::ARMASimulate
Declared in Dew::Stats::Units::StatTimeSerAnalysis · Dew.Stats/Units.StatTimeSerAnalysis.h · Cross-compiler