You are here: Symbol Reference > StatTimeSerAnalysis Namespace > Functions > StatTimeSerAnalysis.ARMASimulate Function
Stats Master VCL
ContentsIndex
PreviousUpNext
StatTimeSerAnalysis.ARMASimulate Function

Simulate the ARMA (p,q) process.

Pascal
procedure ARMASimulate(const p: TVec; const t: TVec; const n: integer; const aResult: TVec); overload;
Parameters 
Description 
stores the AR coefficients. Length of the p vector defines AR(p) order. 
stores the MA coefficients. Length of the t vector defines MA(q) order. 
defines number of points to simulate. 
aResult 
returns ARMA (p,q) time series. Size of Result vector is adjusted automatiacally. 

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

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;
#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.
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!