Estimate an ARMA processΒΆ

In this example we are going to estimate a scalar ARMA process using the Whittle estimator.

In [1]:
from __future__ import print_function
import openturns as ot
import matplotlib.pyplot as plt
ot.RandomGenerator.SetSeed(0)
In [2]:
# Create an arma process
myTimeGrid = ot.RegularGrid(0.0, 0.1, 30)
myWhiteNoise = ot.WhiteNoise(ot.Triangular(-1.0, 0.0, 1.0), myTimeGrid)
myARCoef = ot.ARMACoefficients([0.4, 0.3, 0.2, 0.1])
myMACoef = ot.ARMACoefficients([0.4, 0.3])
myARMAProcess = ot.ARMA(myARCoef, myMACoef, myWhiteNoise)
myTimeSeries = myARMAProcess.getRealization()
In [3]:
# Create the estimator
myFactory_42 = ot.WhittleFactory(4, 2)
In [4]:
# Estimate the ARMA process
myARMA_42, myCriterion = myFactory_42.buildWithCriteria(ot.TimeSeries(myTimeSeries))
AICc, AIC, BIC = myCriterion[0:3]
print(AICc, AIC, BIC)
41.22386791008901 25.223867910089016 49.13657072551996