Language Reference

RATIO Function

RATIO (ar, ma, terms <, dim> ) ;

This function is supported by the IML procedure and the iml action.

The RATIO function divides matrix polynomials.

The arguments to the RATIO function are as follows:

ar

is an n times left-parenthesis n s right-parenthesis matrix that represents a matrix polynomial generating function, normal upper Phi left-parenthesis upper B right-parenthesis, in the variable B. The first n times n submatrix represents the constant term and must be nonsingular, the second n times n submatrix represents the first-order coefficients, and so on.

ma

is an n times left-parenthesis m t right-parenthesis matrix that represents a matrix polynomial generating function, normal upper Theta left-parenthesis upper B right-parenthesis, in the variable B. The first n times m submatrix represents the constant term, the second n times m submatrix represents the first-order term, and so on.

terms

is a scalar that contains the number of terms to be computed, denoted by r in the following discussion. This value must be positive.

dim

is a scalar that contains the value of m, a dimension of the matrix ma. The default value is 1.

The RATIO function multiplies a matrix of polynomials by the inverse of another matrix of polynomials. It is useful for expressing univariate and multivariate ARMA models in pure moving average or pure autoregressive forms.

The value returned is an n times left-parenthesis m r right-parenthesis matrix that contains the terms of normal upper Phi left-parenthesis upper B right-parenthesis Superscript negative 1 Baseline normal upper Theta left-parenthesis upper B right-parenthesis considered as a matrix of rational functions in B that have been expanded as power series.

The RATIO function can be used to consolidate the matrix operators that are used in a multivariate time series model of the form

normal upper Phi left-parenthesis upper B right-parenthesis bold upper Y Subscript t Baseline equals normal upper Theta left-parenthesis upper B right-parenthesis epsilon Subscript t

where normal upper Phi left-parenthesis upper B right-parenthesis and normal upper Theta left-parenthesis upper B right-parenthesis are matrix polynomial operators whose first matrix coefficients are identity matrices. The RATIO function can be used to compute a truncated form of normal upper Psi left-parenthesis upper B right-parenthesis equals normal upper Phi left-parenthesis upper B right-parenthesis Superscript negative 1 Baseline normal upper Theta left-parenthesis upper B right-parenthesis for the equivalent infinite-order model

bold upper Y Subscript t Baseline equals normal upper Psi left-parenthesis upper B right-parenthesis epsilon Subscript t

The RATIO function can also be used for simple scalar polynomial division, giving a truncated form of theta left-parenthesis x right-parenthesis slash phi left-parenthesis x right-parenthesis for two scalar polynomials theta left-parenthesis x right-parenthesis and phi left-parenthesis x right-parenthesis.

The cumulative sum of the elements of a column vector x can be obtained by using the following statement:

 ratio({ 1 -1}, x, ncol(x));

The following example defines polynomial coefficients that are used in a multivariate ARMA(1,1) model and computes the ratio of the polynomials:

ar = {1 0 -0.5  2,
      0 1  3   -0.8};
ma = {1 0  0.9  0.7,
      0 1  2   -0.4};
psi = ratio(ar, ma, 4, 2);
print psi;

Figure 360: The Ratio of Polynomials

psi
101.4-1.32.7-1.4511.35-9.165
01-10.4-54.22-12.17.726


Last updated: May 07, 2026