Prints the mean of the time series, the estimate of the overall constant, the estimates of the autoregressive parameters, the estimates of the moving average parameters, and the estimate of the random shock variance.
IMEAN — Option for centering the time series X. (Input) Default: IMEAN = 1
IMEAN
Action
0
WMEAN is user specified.
1
WMEAN is set to the arithmetic mean of X.
WMEAN — Constant used to center the time series X. (Input, if IMEAN = 0; output, if IMEAN = 1) Default: WMEAN = 0.0.
NPAR — Number of autoregressive parameters. (Input) NPAR must be greater than or equal to zero. Default: NPAR = size (PAR,1).
NPMA — Number of moving average parameters. (Input) NPMA must be greater than or equal to zero. Default: NPMA = size (PMA,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. 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.
FORTRAN 90 Interface
Generic: CALLNSPE (W, CNST, PAR, PMA, AVAR[, …])
Specific: The specific interface names are S_NSPE and D_NSPE.
Routine NSPE computes preliminary estimates of the parameters of an ARMA process given a sample of n = NOBS observations {Wt} for t = 1, 2, …, n.
Suppose the time series {Wt} is generated by an ARMA(p,q) model of the form
ɸ(B)Wt= θ0 + θ(B)At t∈ {0, ±1, ±2, …}
where B is the backward shift operator,
ɸ(B) = 1 −ɸ1(B) −ɸ2(B)2−…−ɸp(B)p
θ (B) = 1 −θ1(B) −θ2(B)2−…−θq(B)q
p = NPAR and q = NPMA. Let
be the estimate of the mean of the time series {Wt} where
The autocovariance function σ(k) is estimated by
where K = p + q. Note that
is an estimate of the sample variance.
Given the sample autocovariances, the routine ARMME is used to compute the method of moments estimates of the autoregressive parameters using the extended Yule‑Walker equations
where
The overall constant θ0 is estimated by
The moving average parameters are estimated using the routine MAMME. Let
then the autocovariances of the derived moving average process
are estimated by
The iterative procedure for determining the moving average parameters is based on the relation
where σ(k) denotes the autocovariance function of the original Wt process.
Let = (0, 1, …, q)T and f = (f0, f1, …, fq)T where
and
Then, the value of at the (i + 1)-th iteration is determined by
The estimation procedure begins with the initial value
and terminates at iteration i when either ∥fi∥ is less than RELERR or i equals MAXIT. The moving average parameter estimates are obtained from the final estimate of by setting
The random shock variance is estimated by
See Box and Jenkins (1976, pages 498–500) for a description of a similar routine.
Comments
1. Workspace may be explicitly provided, if desired, by use of N2PE/DN2PE. The reference is:
ACV — Work vector of length equal to NPAR + NPMA + 1.
PARWK — Work vector of length equal to NPAR + 1.
ACVMOD — Work vector of length equal to NPMA + 1.
TAUINI — Work vector of length equal to NPMA + 1.
TAU — Work vector of length equal to NPMA + 1.
FVEC — Work vector of length equal to NPMA + 1.
FJAC — Work vector of length equal to (NPMA + 1)2.
R — Work vector of length equal to (NPMA + 1) * (NPMA + 2)/2.
QTF — Work vector of length equal to NPMA + 1.
WKNLN — Work vector of length equal to 5 * (NPMA + 1).
A — Work vector of length equal to NPAR2.
FAC — Work vector of length equal to NPAR2.
IPVT — Work vector of length equal to NPAR.
WKARMM — Work vector of length equal to NPAR.
2. Informational error
Type
Code
Description
4
1
The nonlinear equation solver did not converge to RELERR within MAXIT iterations.
3. The value of WMEAN is used in the computation of the sample autocovariances of W in the process of obtaining the preliminary autoregressive parameter estimates. Also, WMEAN is used to obtain the value of CNST.
Example
Consider the Wölfer Sunspot Data (Anderson 1971, page 660) consisting of the number of sunspots observed each year from 1749 through 1924. The data set for this example consists of the number of sunspots observed from 1770 through 1869. Routine NSPE is used to compute preliminary estimates
for the following ARMA (2, 1) model
where the errors At are independently distributed each normal with mean zero and variance