Computes least‑squares estimates of a linear regression model for a multichannel time series with a specified base channel.
Required Arguments
X — NOBSX by NCHANX matrix containing the time series. (Input) Each row of X corresponds to an observation of a multivariate time series, and each column of X corresponds to a univariate time series. The base time series or output channel is contained in the first column.
NDIFF — Vector of length NCHANX containing the order of differencing for each channel of X. (Input) The elements of NDIFF must be greater than or equal to zero.
NDPREG — Vector of length NCHANX containing the number of regression parameters in the differenced form of the model for each channel of X. (Input) The elements of NDPREG must be greater than or equal to zero.
LAG — Vector of length NCHANX containing the amount of time that each channel of X is to lag the base series. (Input) The elements of LAG must be greater than or equal to zero.
CNST — Estimate of the overall constant. (Output)
NPREG — Number of regression parameters in the undifferenced model. (Output)
NOBSX — Number of observations in each channel of the time series X. (Input) NOBSX must be less than or equal LDX and greater than max(NDPREG(i) + LAG(i)) for i = 1, 2, …, NCHANX. Default: NOBSX = size (X,1).
NCHANX — Number of channels in the time series X. (Input) NCHANX must be greater than or equal to one. Default: NCHANX = size (X,2).
LDX — Leading dimension of X exactly as specified in the dimension statement of the calling program. (Input) Default: LDX = size (X,1).
IMEAN — Option for computation of the means of the channels of X. (Input) Default: IMEAN = 1.
IMEAN
Action
0
XMEAN is user specified.
1
XMEAN is set to the vector of arithmetic means of the channels of X.
XMEAN — Vector of length NCHANX containing the means of the channels of X. (Input, if IMEAN = 0; output, if IMEAN = 1)
Routine MLSE performs least‑squares estimation of a linear regression model for a multichannel time series with a specified base channel.
Define the multichannel time series X by
X = (X1, X2, …, Xm)
where
Xj = (X1j, X2j, …, Xnj)Tj = 1, 2, …, m
with n = NOBSX and m = NCHANX. The columns of X correspond to individual channels of a multichannel time series and may be examined from a univariate perspective. The rows of X correspond to observations of an m‑variate time series and may be examined from a multivariate perspective. Note that an alternative characterization of the multivariate time series X considers the columns of X to be observations of an m‑variate time series with the rows of X containing univariate time series. For example, see Priestley (1981, page 692) and Fuller (1976, page 14).
The model is formed by regressing the base series X1 on its previous values and on the remaining channels X2, …, Xm. The differenced form of the model is given by
where θ0 = CNST is the overall constant, dk = NDIFF(k) is the order of differencing Xk, lk = LAG(k) is the amount Xk lags X1,
and pk = NDPREG(k) for k = 1, 2, …, m.
The undifferenced form of the model is given by
where the undifferenced parameters are defined by
for k = 1, 2, …, m. Note that if l1≥d1≥ 0, the base series terms Xt−j,1 at lags j = 1, …, (l1‑ 1) are omitted from the right‑hand side of the above model when d1≥ 1. In the actual computations, these terms are included.
Comments
1. Workspace may be explicitly provided, if desired, by use of M2SE/DM2SE. The reference is:
Consider the Wölfer Sunspot Data (Box and Jenkins 1976, page 530) along with data on northern light activity and earthquake activity (Robinson 1967, page 204) to be a three‑channel time series. Routine MLSE is applied to these data to examine the regressive relationship between the channels.
USE GDATA_INT
USE MLSE_INT
USE UMACH_INT
IMPLICIT NONE
INTEGER LDX, NCHANX, NOBSX
PARAMETER (NCHANX=3, NOBSX=100, LDX=NOBSX)
!
INTEGER I, IMEAN, LAG(NCHANX), NCOL, NDIFF(NCHANX), &
NDPREG(NCHANX), NOUT, NPREG, NROW
REAL CNST, PREG(20), RDATA(100,4), X(LDX,NCHANX), &
99994 FORMAT (1X, ' I NDIFF(I) LAG(I) NDPREG(I) XMEAN(I)')
DO 10 I=1, NCHANX
WRITE (NOUT,99995) I, NDIFF(I), LAG(I), NDPREG(I), XMEAN(I)
99995 FORMAT (1X, 4(I3,6X), F12.4)
10 CONTINUE
WRITE (NOUT,99996) CNST
99996 FORMAT (1X, 'Overall constant, CNST = ', F12.4)
WRITE (NOUT,99997) NPREG
99997 FORMAT (//, 1X, 'Total number of parameters, NPREG = ', I2)
WRITE (NOUT,99998)
99998 FORMAT (//, 1X, ' I PREG(I)')
DO 20 I=1, NPREG
WRITE (NOUT,99999) I, PREG(I)
99999 FORMAT (1X, I2, 5X, F12.4)
20 CONTINUE
!
END
Output
Results of MLSE/M2SE
I NDIFF(I) LAG(I) NDPREG(I) XMEAN(I)
1 1 1 2 46.9400
2 1 2 1 63.4300
3 0 1 3 97.9700
Overall constant, CNST = -7.2698
Total number of parameters, NPREG = 8
I PREG(I)
1 -0.1481
2 -1.3444
3 0.4925
4 -0.0302
5 0.0302
6 -0.0210
7 0.0187
8 0.0765
Example 2
Consider the Gas Furnace Data (Box and Jenkins 1976, pages 532–533) where X1 is the percent CO2 in the outlet gas and X2 is the input gas rate in cubic feet/minute. Application of routine MLSE to these data produces the following results:
USE GDATA_INT
USE SCOPY_INT
USE MLSE_INT
USE UMACH_INT
IMPLICIT NONE
INTEGER LDX, NCHANX, NOBSX
PARAMETER (NCHANX=2, NOBSX=296, LDX=NOBSX)
!
INTEGER I, IMEAN, LAG(NCHANX), NCOL, NDIFF(NCHANX), &
NDPREG(NCHANX), NOUT, NPREG, NROW
REAL CNST, PREG(20), RDATA(296,2), X(LDX,NCHANX), &