TFPE

   more...
Computes preliminary estimates of parameters for a univariate transfer function model.
Required Arguments
NDELAY — Time delay parameter. (Input)
NDELAY must be greater than or equal to zero.
WTIR — Vector of length MWTIR + 1 containing the impulse response weight estimates. (Input)
The impulse response weight estimate of index k is given by WTIR(k) for k = 0, 1, MWTIR.
SNOISE — Vector of length NSNOIS containing the noise series. (Input)
AVAR — Estimate of the random shock variance. (Output)
Optional Arguments
IPRINT — Printing option. (Input)
Default: IPRINT = 0.
IPRINT
Action
0
No printing is performed.
1
Prints estimates of transfer function parameters, estimates of noise model parameters, and an estimate of the random shock variance.
NPLHS — Number of left‑hand side transfer function parameters. (Input)
NPLHS must be greater than or equal to zero.
Default: NPLHS = size (PLHS,1) if PLHS is present. Otherwise, NPLHS=0.
NPRHS — Number of right‑hand side transfer function parameters (excluding the index 0 parameter). (Input)
NPRHS must be greater than or equal to zero.
Default: NPRHS = size (PRHS,1) – 1 if PRHS is present. Otherwise, NPRHS=0.
NPNAR — Number of noise autoregressive parameters. (Input)
NPNAR must be greater than or equal to zero.
Default: NPNAR = size (PNAR,1) if PNAR is present. Otherwise, NPNAR=0.
NPNMA — Number of noise moving average parameters. (Input)
NPNMA must be greater than or equal to zero.
Default: NPNMA = size (PNMA,1) if PNMA is present. Otherwise, NPNMA=0.
MWTIR — Maximum index of the impulse response weights. (Input)
MWTIR must be greater than or equal to NPLHS + NPRHS + NDELAY.
Default: MWTIR = size (WTIR,1) –1.
NSNOIS — Number of elements in the noise series. (Input)
NSNOIS must be greater than or equal to NPNAR + NPNMA + 1.
Default: NSNOIS = size (SNOISE,1).
RELERR — Stopping criterion for use in the nonlinear equation solver. (Input)
If RELERR = 0.0, then the default value RELERR = 100.0 * AMACH(4) is used. See the documentation for routine AMACH in the Reference Material section of this manual.
Default: RELERR = 0.0.
MAXIT — The maximum number of iterations allowed in the nonlinear equation solver. (Input)
If MAXIT = 0, then the default value MAXIT = 200 is used.
Default: MAXIT = 0.
PLHS — Vector of length NPLHS containing the estimates of the left‑hand side transfer function parameters. (Output)
The LHS weight estimates are PLHS(k), k = 1, …, NPLHS.
PRHS — Vector of length NPRHS + 1 containing the estimates of the right‑hand side transfer function parameters. (Output)
The RHS weight estimates are PRHS(k), k = 0, …, NPRHS.
PNAR — Vector of length NPNAR containing the estimates of the noise autoregressive parameters. (Output)
PNMA — Vector of length NPNMA containing the estimates of the noise moving average parameters. (Output)
FORTRAN 90 Interface
Generic: CALL TFPE (NDELAY, WTIR, SNOISE, AVAR [])
Specific: The specific interface names are S_TFPE and D_TFPE.
FORTRAN 77 Interface
Single: CALL TFPE (IPRINT, NPLHS, NPRHS, NPNAR, NPNMA, NDELAY, MWTIR, WTIR, NSNOIS, SNOISE, RELERR, MAXIT, PLHS, PRHS, PNAR, PNMA, AVAR)
Double: The double precision name is DTFPE.
Description
Routine TFPE computes preliminary estimates of the parameters of a transfer function model given a sample of n = NOBS observations of the differenced input {xt} and differenced 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 = δ1(B)ω(B)Xtb + Nt
or, equivalently,
yt = δ1(B)ω(B)xtb + nt
where nt = dNt and the left‑hand side and right‑hand side transfer function polynomial operators are
δ(B) = 1 δ1B δ2B2 δr Br
ω(B) = ω0 ω1B ω2B2 ωs Bs
with r = NPLHS, s = NPRHS, and b = NDELAY. The noise process {Nt} and the input process {Xt} are assumed to be independent with the noise process given by the ARIMA model
ɸ(B)nt = θ(B)At
where
ɸ(B) = 1 ɸ1B ɸ2B2 ɸp Bp
θ(B) = 1 θ1B θ2B2 θq Bq
with p = NPNAR and q = NPNMA.
The impulse response weights and the transfer function parameters are related by
See Abraham and Ledolter (1983, page 341). The r left‑hand side transfer function parameters are estimated using the difference equation given as the last case above. The resulting estimates
are then substituted into the middle two cases to determine the s + 1 estimates
The noise series parameters are estimated using the routine NSPE. The impulse response weights { νk} and differenced noise series{nt} may be computed using the routine IRNSE. See Box and Jenkins (1976, pages 511–513).
Comments
1. Workspace may be explicitly provided, if desired, by use of T2PE/DT2PE. The reference is:
CALL T2PE (IPRINT, NPLHS, NPRHS, NPNAR, NPNMA, NDELAY, MWTIR, WTIR, NSNOIS, SNOISE, RELERR, MAXIT, PLHS, PRHS, PNAR, PNMA, AVAR, A, FAC, IPVT, WK, ACV, PARWK, ACVMOD, TAUINI, TAU, FVEC, FJAC, R, QTF, WKNLN, H)
The additional arguments are as follows:
A — Work vector of length (max(NPLHS, NPNAR))2.
FAC — Work vector of length (max(NPLHS, NPNAR))2.
IPVT — Work vector of length max(NPLHS, NPNAR).
WK — Work vector of length max(NPLHS, NPNAR).
ACV — Work vector of length NPNAR + NPNMA + 1.
PARWK — Work vector of length NPNAR + 1.
ACVMOD — Work vector of length NPNMA + 1.
TAUINI — Work vector of length NPNMA + 1.
TAU — Work vector of length NPNMA + 1.
FVEC — Work vector of length NPNMA + 1.
FJAC — Work vector of length (NPNMA + 1)2.
R — Work vector of length (NPNMA + 1) * (NPNMA + 2)/2.
QTF — Work vector of length NPNMA + 1.
WKNLN — Work vector of length 5 * (NPNMA + 1).
H — Work vector of length NPLHS.
2. Informational error
Type
Code
Description
4
1
The nonlinear equation solver did not converge to RELERR within MAXIT iterations.
3. The impulse response weight estimates and the noise series may be computed using routine IRNSE.
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. The data is retrieved by routine GDATA. Routine IRNSE computes the impulse response weights. Application of routine TFPE to these weights produces the following results:
 
USE GDATA_INT
USE IRNSE_INT
USE WROPT_INT
USE TFPE_INT
 
IMPLICIT NONE
INTEGER MWTIR, MWTSN, NDELAY, NOBS, NPAR, NPLHS, NPMA, NPNAR, &
NPNMA, NPRHS, NSNOIS
PARAMETER (MWTIR=10, NDELAY=3, NOBS=100, NPAR=3, NPLHS=2, &
NPMA=0, NPNAR=2, NPNMA=0, NPRHS=2, MWTSN=MWTIR, &
NSNOIS=NOBS-MWTSN)
!
INTEGER IPRINT, ISETNG, NCOL, NROW
REAL AVAR, PAR(NPAR), PLHS(NPLHS), PMA(1), PNAR(NPNAR), &
PNMA(1), PRHS(NPRHS+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)
! Convergence parameters
! Compute preliminary estimates of
! transfer function parameters
ISETNG = 1
CALL WROPT (-6, ISETNG, 1)
IPRINT = 1
CALL TFPE (NDELAY, WTIR, SNOISE, AVAR, IPRINT=IPRINT, NPLHS=NPLHS, &
NPRHS=NPRHS, NPNAR=NPNAR, PLHS=PLHS, PRHS=PRHS, PNAR=PNAR)
!
END
Output
 
PLHS from TFPE/T2PE
1 2
0.120342 0.326149
 
PRHS from TFPE/T2PE
1 2 3
-0.623240 0.318698 0.362488
 
PNAR from TFPE/T2PE
1 2
1.64679 -0.70916
 
PNMA is not written since NPNMA = 0
 
AVAR from TFPE/T2PE = 2.85408E-02