IRNSE
Computes estimates of the impulse response weights and noise series of a univariate transfer function model.
Required Arguments
X — Vector of length NOBS containing the input time series. (Input)
Y — Vector of length NOBS containing the output time series. (Input)
MWTIR — Maximum index of the impulse response weights. (Input)
MWTIR must be greater than or equal to zero and less than or equal to NOBS ‑ 1.
MWTSN — Maximum index of the impulse response weights used to compute the noise series. (Input)
MWTSN must be greater than or equal to zero and less than or equal to MWTIR.
WTIR — Vector of length MWTIR + 1 containing the impulse response weight estimates. (Output)
The impulse response weight estimate of index k is given by WTIR(k) for
k = 0, 1, …, MWTIR.
SNOISE — Vector of length NOBS ‑ MWTSN containing the noise series based on the impulse response weight estimates. (Output)
XPW — Vector of length NOBS ‑ NPAR containing the prewhitened input time series X. (Output)
YPW — Vector of length NOBS ‑ NPAR containing the prewhitened output time series Y. (Output)
Optional Arguments
NOBS — Number of observations in each time series. (Input)
NOBS must be greater than or equal to two.
Default: NOBS = size (X,1).
IPRINT — Printing option. (Input)
Default: IPRINT = 0.
IPRINT |
Action |
0 |
No printing is performed. |
1 |
Prints the estimates of the impulse response weights and the noise series. |
NPAR — Number of prewhitening autoregressive parameters. (Input)
NPAR must be greater than or equal to zero.
Default: NPAR = size (PAR,1) if PAR is present otherwise NPAR = 0.
PAR — Vector of length NPAR containing the prewhitening autoregressive parameters. (Input)
Default: PAR = 0.0.
NPMA — Number of prewhitening moving average parameters. (Input)
NPMA must be greater than or equal to zero.
Default: NPMA = size (PMA,1) if PAR is present, otherwise NPMA = 0.
PMA — Vector of length NPMA containing the prewhitening moving average parameters. (Input)
Default: PMA = 0.0.
FORTRAN 90 Interface
Generic: CALL IRNSE (X, Y, MWTIR, MWTSN, WTIR, SNOISE, XPW, YPW [, …])
Specific: The specific interface names are S_IRNSE and D_IRNSE.
FORTRAN 77 Interface
Single: CALL IRNSE (NOBS, X, Y, IPRINT, NPAR, PAR, NPMA, PMA, MWTIR, MWTSN, WTIR, SNOISE, XPW, YPW)
Double: The double precision name is DIRNSE.
Description
Routine IRNSE estimates the impulse response weights and noise series of a transfer function model given a sample of n = NOBS observations of the input {xt} and output {yt} for t = 1, 2, …, n. Define {xt} and {yt}, respectively, by
and
where {Xt} and {Yt} for t = (‑d + 1), …, n represent the undifferenced input and output series with
estimates of their respective means. The differenced input and output series may be obtained using the routine DIFF following any preliminary transformation of the data.
The transfer function model is defined by
Yt = ν(B)Xt + Nt
or, equivalently,
yt = ν(B)xt + nt
with transfer function
ν(B) = ν0 + ν1B + ν2B2 + …
and differenced noise series nt = ∇dNt.
The prewhitened input and output series are computed for t = (p + 1), …, n according to
αt = ɸ(B)xt + θ1(B) αt
βt = ɸ(B)yt + θ1(B) βt
where
ɸ(B) = 1 − ɸ1B − ɸ2B2 − … − ɸpBp
θ(B) = θ1B + θ2B2 + … + θqBq
The parameters of the prewhitening transformation may be estimated roughly using the routine NSPE or more precisely using the routine NSLSE. The correlation relationship between {αt}, { βt}, and {nt} may be further examined using the routines ACF, PACF, and CCF.
The impulse response weights { νk} are estimated by
where K = MWTIR,
denote the standard deviation of { αt} and { βt};
represents the cross‑correlation function between {αt} and { βt}. The differenced noise series {nt} for t = (Kʹ + 1), …, n is reconstructed using the model
where Kʹ = MWTSN.
Comments
1. Workspace may be explicitly provided, if desired, by use of I2NSE/DI2NSE. The reference is:
CALL I2NSE (NOBS, X, Y, IPRINT, NPAR, PAR, NPMA, PMA, MWTIR, MWTSN, WTIR, SNOISE, XPW, YPW, ACPWX, ACPWY, CCPW)
The additional arguments are as follows:
ACPWX — Vector of length MWTIR + 1 containing the estimated autocorrelation function of PWX. (Output)
ACPWY — Vector of length MWTIR + 1 containing the estimated autocorrelation function of PWY. (Output)
CCPW — Vector of length 2 * MWTIR + 1 containing the estimated cross‑correlation function of PWX and PWY. (Output)
2. The input series X and output series Y are assumed to be the result of transforming and differencing the raw input and output series. The routines BCTR and DIFF may be used, respectively, to perform a Box‑Cox transformation and difference the raw input and output series.
3. Note that the prewhitened input and output are computed at time t = NPAR + 1 through t = NOBS. Also, the noise series is computed at time t = MWTSN + 1 through t = NOBS.
Example
Consider the Gas Furnace Data (Box and Jenkins 1976, pages 532–533) where X is the input gas rate in cubic feet/minute and Y is the percent CO2 in the outlet gas. Application of routine IRNSE to these data produces the following results:
USE GDATA_INT
USE IRNSE_INT
USE WRRRN_INT
IMPLICIT NONE
INTEGER LDX, MWTIR, MWTSN, NDX, NOBS, NOPRIN, NPAR, NPMA
PARAMETER (LDX=296, MWTIR=10, NDX=2, NOBS=296, &
NOPRIN=0, NPAR=3, NPMA=0, MWTSN=MWTIR)
!
INTEGER NCOL, NROW
REAL PAR(NPAR), PMA(1), RDATA(296,2), SNOISE(NOBS-MWTSN), &
WTIR(MWTIR+1), X(NOBS), XPW(NOBS-NPAR), Y(NOBS), &
YPW(NOBS-NPAR)
!
EQUIVALENCE (X(1), RDATA(1,1)), (Y(1), RDATA(1,2))
! Gas Furnace Data
CALL GDATA (7, RDATA, NROW, NCOL)
! Specify AR parameters for
! prewhitening transformation
PAR(1) = 1.97
PAR(2) = -1.37
PAR(3) = 0.34
! Compute estimates of impulse
! response weights and noise series
CALL IRNSE (X, Y, MWTIR, MWTSN, WTIR, SNOISE, XPW, YPW, PAR=PAR)
! Print results
CALL WRRRN ('WTIR', WTIR, 1, 11, 1)
CALL WRRRN ('SNOISE', SNOISE, 1, 20, 1)
!
END
Output
WTIR
1 2 3 4 5 6 7 8
-0.0355 0.0716 -0.0764 -0.5655 -0.6549 -0.8936 -0.5358 -0.3482
9 10 11
-0.0782 0.0277 -0.1364
SNOISE
1 2 3 4 5 6 7 8 9 10
53.21 53.49 53.72 54.05 53.98 53.95 53.69 53.02 52.56 52.33
11 12 13 14 15 16 17 18 19 20
52.47 52.69 52.57 52.63 52.81 53.14 53.21 53.20 53.05 52.88