Calculates the rational power spectrum for an ARMA model. It also computes the rational power spectrum for AR and MA models by setting the number of MA or AR coefficients to zero, respectively.
Required Arguments
PAR — Vector of length NPAR. If NPAR > 0 then PAR contains coefficients for the autoregressive terms in the model. If NPAR = 0, then the contents of PAR are ignored. (Input)
PMA — Vector of length NPMA. If NPMA > 0 then PMA contains the coefficients for the moving‑average terms in the ARMA model. If NPMA = 0 then the contents of PMA are ignored. (Input)
NF — Number of frequencies at which to evaluate the spectral density estimate. NF must be greater than or equal to one. (Input)
AVAR — Estimate of the random shock variance. AVAR must be greater than zero. (Input)
S — Vector of length NF+1 containing the estimated power spectrum. (Output)
Optional Arguments
NPAR — Number of autoregressive (AR) parameters. NPAR must be greater than or equal to zero. (Input) Default: NPAR=size(PAR).
NPMA — Number of moving‑average (MA) parameters. Must be greater than or equal to zero. (Input) Default: NPMA= size(PMA).
Specific: The specific interface names are S_ARMA_SPEC and D_ARMA_SPEC.
Description
The routine ARMA_SPEC is derived from the rational power spectrum analysis described by Akaike and Nakagawa (1972) and the RASPEC routine published in the original TIMSAC Library.
Using the notation developed in the introduction to this chapter, the stationary time series Wt with mean μ can be represented by the nonseasonal autoregressive moving average model (ARMA) by the following relationship:
where
B is the backward shift operator defined by ,
and
Routine ARMA_SPEC uses estimates for the coefficients ɸ1, ɸ2, …, ɸNPAR, and Θ1, Θ2, …, ΘNPMA as input to its algorithm, PAR and PMA respectively. These estimates can be derived from MAX_ARMA or by using NSLSE.
Routine ARMA_SPEC also requires an initial estimate for the variance of the white noise in the series. In MAX_ARMA this is returned as AVAR. This is also returned from the autocovariance procedure ACF as ACV(0).
Example
Consider the Wolfer Sunspot Data (Box and Jenkins 1976, page 530) consisting of the number of sunspots observed each year from 1770 through 1869. These data can be modeled using the following model [ARMA(NPAR=2, NPMA=1)]
In this example, estimates of the coeffiecients in this model are obtained using MAX_ARMA. These are then sent to ARMA_SPEC to obtain the estimated power spectrum.