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(*args)

Estimate the ARMA process.

getClassName()

Accessor to the object's name.

getCurrentP()

Accessor to the current P order.

getCurrentQ()

Accessor to the current Q order.

getId()

Accessor to the object's id.

getInitialARCoefficients()

Accessor to the initial AR coefficients.

getInitialCovarianceMatrix()

Accessor to the initial covariance matrix of the white noise.

getInitialMACoefficients()

Accessor to the initial MA coefficients.

getInvertible()

Accessor to the invertible constraint.

getName()

Accessor to the object's name.

getP()

Accessor to the P orders.

getQ()

Accessor to the Q orders.

getShadowedId()

Accessor to the object's shadowed id.

getVisibility()

Accessor to the object's visibility state.

hasName()

Test if the object is named.

hasVisibleName()

Test if the object has a distinguishable name.

setInitialARCoefficients(phi)

Accessor to the initial AR coefficients.

setInitialConditions(arCoefficients, ...)

Accessor to the initial AR coefficients.

setInitialCovarianceMatrix(covarianceMatrix)

Accessor to the initial covariance matrix of the white noise.

setInitialMACoefficients(theta)

Accessor to the initial MA coefficients.

setInvertible(invertible)

Accessor to the invertible constraint.

setName(name)

Accessor to the object's name.

setShadowedId(id)

Accessor to the object's shadowed id.

setVisibility(visible)

Accessor to the object's visibility state.

getVerbose

setVerbose

__init__(*args)
build(*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()

Accessor to the object’s name.

Returns:
class_namestr

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

getCurrentP()

Accessor to the current P order.

Returns:
pint

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

getCurrentQ()

Accessor to the current Q order.

Returns:
qint

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

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

getInitialARCoefficients()

Accessor to the initial AR coefficients.

Returns:
initARCoeffARMACoefficients

The initial AR coefficients used for the optimization algorithm.

getInitialCovarianceMatrix()

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()

Accessor to the initial MA coefficients.

Returns:
initMACoeffARMACoefficients

The initial MA coefficients used for the optimization algorithm.

getInvertible()

Accessor to the invertible constraint.

Returns:
invertiblebool

The initial AR coefficients used for the optimization algorithm.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getP()

Accessor to the P orders.

Returns:
indPIndices

All the p orders that will be investigated.

getQ()

Accessor to the Q orders.

Returns:
indQIndices

All the p orders that will be investigated.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:
idint

Internal unique identifier.

getVisibility()

Accessor to the object’s visibility state.

Returns:
visiblebool

Visibility flag.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:
hasVisibleNamebool

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

setInitialARCoefficients(phi)

Accessor to the initial AR coefficients.

Parameters:
initARCoeffARMACoefficients

The initial AR coefficients used for the optimization algorithm.

setInitialConditions(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(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(theta)

Accessor to the initial MA coefficients.

Parameters:
initMACoeffARMACoefficients

The initial MA coefficients used for the optimization algorithm.

setInvertible(invertible)

Accessor to the invertible constraint.

Parameters:
invertiblebool

The initial AR coefficients used for the optimization algorithm.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:
idint

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:
visiblebool

Visibility flag.

Examples using the class

Estimate a multivariate ARMA process

Estimate a multivariate ARMA process