ARMALikelihoodFactory

class ARMALikelihoodFactory(*args)

Maximum likelihood estimator of a multivariate ARMA normal process.

Available constructors:

ARMALikelihoodFactory()

ARMALikelihoodFactory(p, q, d, invertible)

ARMALikelihoodFactory(indP, indQ, d, invertible)

Parameters:

p : int

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

q : int

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

d : int, d \geq 1

Dimension of the process.

invertible : bool, optional

Restrict the estimation to invertible ARMA processes.

By default: True.

indP : Indices

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

indQ : Indices

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()
getCurrentQ()
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()
getName() Accessor to the object’s name.
getP()
getQ()
getShadowedId() Accessor to the object’s shadowed id.
getVerbose() Accessor to the verbose mode.
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)
setName(name) Accessor to the object’s name.
setShadowedId(id) Accessor to the object’s shadowed id.
setVerbose(verbose) Accessor to the verbose mode.
setVisibility(visible) Accessor to the object’s visibility state.
__init__(*args)
build(*args)

Estimate the ARMA process.

Available usages:

build(myTimeSeries)

build(myProcessSample)

Parameters:

myTimeSeries : TimeSeries

One realization of the process.

myProcessSample : ProcessSample

Several realizations of the process.

Returns:

myARMA : ARMA

The process estimated with the maximum likelihood estimator.

getClassName()

Accessor to the object’s name.

Returns:

class_name : str

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

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getInitialARCoefficients()

Accessor to the initial AR coefficients.

Returns:

initARCoeff : ARMACoefficients

The initial AR coefficients used for the optimization algorithm.

getInitialCovarianceMatrix()

Accessor to the initial covariance matrix of the white noise.

Returns:

initCovMat : CovarianceMatrix

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

getInitialMACoefficients()

Accessor to the initial MA coefficients.

Returns:

initMACoeff : ARMACoefficients

The initial MA coefficients used for the optimization algorithm.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:

id : int

Internal unique identifier.

getVerbose()

Accessor to the verbose mode.

Returns:

verboseMode : bool

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

getVisibility()

Accessor to the object’s visibility state.

Returns:

visible : bool

Visibility flag.

hasName()

Test if the object is named.

Returns:

hasName : bool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:

hasVisibleName : bool

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

setInitialARCoefficients(phi)

Accessor to the initial AR coefficients.

Parameters:

initARCoeff : ARMACoefficients

The initial AR coefficients used for the optimization algorithm.

setInitialConditions(arCoefficients, maCoefficients, covarianceMatrix)

Accessor to the initial AR coefficients.

Parameters:

initARCoeff : ARMACoefficients

The initial AR coefficients used for the optimization algorithm.

initMACoeff : ARMACoefficients

The initial AR coefficients used for the optimization algorithm.

initCovMatr : CovarianceMatrix

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:

initCovMat : CovarianceMatrix

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

setInitialMACoefficients(theta)

Accessor to the initial MA coefficients.

Parameters:

initMACoeff : ARMACoefficients

The initial MA coefficients used for the optimization algorithm.

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:

id : int

Internal unique identifier.

setVerbose(verbose)

Accessor to the verbose mode.

Parameters:

verboseMode : bool

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

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:

visible : bool

Visibility flag.