StatTimeSerAnalysis.ARMASimulate Method

procedure ARMASimulate(const p: TVec; const t: TVec; const n: Integer; const aResult: TVec);

Simulate the ARMA (p,q) process.

#NameDescription
1pstores the AR coefficients. Length of the p vector defines AR(p) order.
2tstores the MA coefficients. Length of the t vector defines MA(q) order.
3ndefines number of points to simulate.
4aResultreturns ARMA (p,q) time series. Size of Result vector is adjusted automatiacally.

Result: stored in self (calling object)

Remarks:

C# Example
Simulate ARMA(1,1) process with Phi=[1.0], Theta=[-0.25].

using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
  private void Example()
  {
    Vector phi = new Vector(0);
    Vector theta = new Vector(0);
    Vector ts = new Vector(0);
    phi.SetIt(false, new double[] {1.0});
    theta.SetIt(false,new double[] {-0.25});
    StatTimeSerAnalysis.ARMASimulate(phi,theta,100,ts);
    // ts now stores 100 points from ARMA(1,1) process.
  }
}
Examples
#include "MtxExpr.hpp"
#include "Math387.hpp"
#include "StatTimeSerAnalysis.hpp"
void __fastcall Example()
{
    sVector phi,theta,ts;
    phi.SetIt(false,OPENARRAY(double,(1.0)));
    theta.SetIt(false,OPENARRAY(double,(-0.25)));
    ARMASimulate(phi,theta,100,ts);
    // ts now stores 100 points from ARMA(1,1) process.
Uses MtxExpr, StatTimeSerAnalysis;
procedure Example;
    var phi,theta,ts: Vector;
begin
    phi.SetIt(false,[1.0]);
    theta.SetIt(false,[-0.25]);
    ARMASimulate(phi,theta,100,ts);
    // ts now stores 100 points from ARMA(1,1) process.
end;
See Also: StatTimeSerAnalysis.ARIMASimulate