ARMALikelihoodFactory

class ARMALikelihoodFactory(*args)

Maximum likelihood estimator of a multivariate ARMA Gaussian process.

Available constructors:

ARMALikelihoodFactory()

ARMALikelihoodFactory(p, q, d, invertible)

ARMALikelihoodFactory(indP, indQ, d, invertible)

Parameters
pint

Order of the AR part of the ARMA(p,q) process of dimension d.

qint

Order of the MA part of the ARMA(p,q) process of dimension d.

dint, d \geq 1

Dimension of the process.

invertiblebool, optional

Restrict the estimation to invertible ARMA processes.

By default: True.

indPIndices

All the p orders that will be investigated. Care: not yet implemented.

indQIndices

All the p orders that will be investigated. Care: not yet implemented.

Notes

We suppose here that the white noise is normal with zero mean and covariance matrix \mat{\Sigma}_{\varepsilon} = \sigma^2\mat{Q} where |\mat{Q}| = 1. It implies that the ARMA process estimated is normal.

Let (t_i, \vect{X}_i)_{0\leq i \leq n-1} be a multivariate time series of dimension d from an ARMA(p,q) process.

If we note \vect{W} = (\vect{X}_0, \hdots, \vect{X}_{n-1}), then \vect{W} is normal with zero mean. Its covariance matrix writes \mathbb{E}(\vect{W}\Tr{\vect{W}})= \sigma^2 \Sigma_{\vect{W}} which depends on the coefficients (\mat{A}_k, \mat{B}_l) for k = 1,\ldots,p and l = 1,\ldots, q and on the matrix \mat{Q}.

The likelihood of \vect{W} writes :

L(\vect{\beta}, \sigma^2 | \vect{W}) = (2 \pi \sigma^2) ^{-\frac{d n}{2}} |\Sigma_{w}|^{-\frac{1}{2}} \exp\left(- (2\sigma^2)^{-1}  \Tr{\vect{W}} \Sigma_{\vect{W}}^{-1}  \vect{W} \right)

where \vect{\beta} = (\mat{A}_{k}, \mat{B}_{l}, \mat{Q}),\ k = 1,\ldots,p, l = 1,\ldots, q and where |.| denotes the determinant.

No evaluation of selection criteria such as AIC or BIC is done.

Examples

Create a time series from a scalar ARMA(4,2) and a normal white noise:

>>> import openturns as ot
>>> myTimeGrid = ot.RegularGrid(0.0, 0.1, 50)
>>> 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()

Estimate the ARMA process with the maximum likelihood estimator:

>>> myFactory = ot.ARMALikelihoodFactory(4, 2, 1)
>>> myARMA = myFactory.build(ot.TimeSeries(myTimeSeries))

Methods

build(self, \*args)

Estimate the ARMA process.

getClassName(self)

Accessor to the object’s name.

getCurrentP(self)

Accessor to the current P order.

getCurrentQ(self)

Accessor to the current Q order.

getId(self)

Accessor to the object’s id.

getInitialARCoefficients(self)

Accessor to the initial AR coefficients.

getInitialCovarianceMatrix(self)

Accessor to the initial covariance matrix of the white noise.

getInitialMACoefficients(self)

Accessor to the initial MA coefficients.

getInvertible(self)

Accessor to the invertible constraint.

getName(self)

Accessor to the object’s name.

getP(self)

Accessor to the P orders.

getQ(self)

Accessor to the Q orders.

getShadowedId(self)

Accessor to the object’s shadowed id.

getVerbose(self)

Accessor to the verbose mode.

getVisibility(self)

Accessor to the object’s visibility state.

hasName(self)

Test if the object is named.

hasVisibleName(self)

Test if the object has a distinguishable name.

setInitialARCoefficients(self, phi)

Accessor to the initial AR coefficients.

setInitialConditions(self, arCoefficients, …)

Accessor to the initial AR coefficients.

setInitialCovarianceMatrix(self, …)

Accessor to the initial covariance matrix of the white noise.

setInitialMACoefficients(self, theta)

Accessor to the initial MA coefficients.

setInvertible(self, invertible)

Accessor to the invertible constraint.

setName(self, name)

Accessor to the object’s name.

setShadowedId(self, id)

Accessor to the object’s shadowed id.

setVerbose(self, verbose)

Accessor to the verbose mode.

setVisibility(self, visible)

Accessor to the object’s visibility state.

__init__(self, *args)

Initialize self. See help(type(self)) for accurate signature.

build(self, *args)

Estimate the ARMA process.

Available usages:

build(myTimeSeries)

build(myProcessSample)

Parameters
myTimeSeriesTimeSeries

One realization of the process.

myProcessSampleProcessSample

Several realizations of the process.

Returns
myARMAARMA

The process estimated with the maximum likelihood estimator.

getClassName(self)

Accessor to the object’s name.

Returns
class_namestr

The object class name (object.__class__.__name__).

getCurrentP(self)

Accessor to the current P order.

Returns
pint

Order of the AR part of the ARMA(p,q) process of dimension d.

getCurrentQ(self)

Accessor to the current Q order.

Returns
qint

Order of the MA part of the ARMA(p,q) process of dimension d.

getId(self)

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getInitialARCoefficients(self)

Accessor to the initial AR coefficients.

Returns
initARCoeffARMACoefficients

The initial AR coefficients used for the optimization algorithm.

getInitialCovarianceMatrix(self)

Accessor to the initial covariance matrix of the white noise.

Returns
initCovMatCovarianceMatrix

The initial covariance matrix of the white noise used for the optimization algorithm.

getInitialMACoefficients(self)

Accessor to the initial MA coefficients.

Returns
initMACoeffARMACoefficients

The initial MA coefficients used for the optimization algorithm.

getInvertible(self)

Accessor to the invertible constraint.

Returns
invertiblebool

The initial AR coefficients used for the optimization algorithm.

getName(self)

Accessor to the object’s name.

Returns
namestr

The name of the object.

getP(self)

Accessor to the P orders.

Returns
indPIndices

All the p orders that will be investigated.

getQ(self)

Accessor to the Q orders.

Returns
indQIndices

All the p orders that will be investigated.

getShadowedId(self)

Accessor to the object’s shadowed id.

Returns
idint

Internal unique identifier.

getVerbose(self)

Accessor to the verbose mode.

Returns
verboseModebool

Get the verbose mode while both the exploration of the possible models and the optimization steps.

getVisibility(self)

Accessor to the object’s visibility state.

Returns
visiblebool

Visibility flag.

hasName(self)

Test if the object is named.

Returns
hasNamebool

True if the name is not empty.

hasVisibleName(self)

Test if the object has a distinguishable name.

Returns
hasVisibleNamebool

True if the name is not empty and not the default one.

setInitialARCoefficients(self, phi)

Accessor to the initial AR coefficients.

Parameters
initARCoeffARMACoefficients

The initial AR coefficients used for the optimization algorithm.

setInitialConditions(self, arCoefficients, maCoefficients, covarianceMatrix)

Accessor to the initial AR coefficients.

Parameters
initARCoeffARMACoefficients

The initial AR coefficients used for the optimization algorithm.

initMACoeffARMACoefficients

The initial AR coefficients used for the optimization algorithm.

initCovMatrCovarianceMatrix

The initial covariance matrix of the white noise used for the optimization algorithm.

setInitialCovarianceMatrix(self, covarianceMatrix)

Accessor to the initial covariance matrix of the white noise.

Parameters
initCovMatCovarianceMatrix

The initial covariance matrix of the white noise used for the optimization algorithm.

setInitialMACoefficients(self, theta)

Accessor to the initial MA coefficients.

Parameters
initMACoeffARMACoefficients

The initial MA coefficients used for the optimization algorithm.

setInvertible(self, invertible)

Accessor to the invertible constraint.

Parameters
invertiblebool

The initial AR coefficients used for the optimization algorithm.

setName(self, name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

setShadowedId(self, id)

Accessor to the object’s shadowed id.

Parameters
idint

Internal unique identifier.

setVerbose(self, verbose)

Accessor to the verbose mode.

Parameters
verboseModebool

Set the verbose mode while both the exploration of the possible models and the optimization steps.

setVisibility(self, visible)

Accessor to the object’s visibility state.

Parameters
visiblebool

Visibility flag.