SPECTRA Statement
SPECTRA statistics < / options> ;
A SPECTRA statement can be used with the TIMESERIES procedure to specify which statistics appear in the OUTSPECTRA= data set. The SPECTRA statement options are used in performing a spectral analysis on the variables listed in the VAR statement. These options affect values that are produced in the PROC TIMESERIES statement’s OUTSPECTRA= data set, and in the periodogram and spectral density estimate. Only one SPECTRA statement is allowed.

The following univariate frequency domain statistics are available:

FREQ

frequency in radians from 0 to 

PERIOD

period or wavelength

COS

cosine transform

SIN

sine transform

P

periodogram

S

spectral density estimates

If none of the frequency domain statistics are specified, the default is as follows:

   spectra period p;

The following options can be specified in the SPECTRA statement following the slash (/):

ADJUSTMEAN | CENTER= NO | YES

specifies whether or not the series should be adjusted by its mean prior to performing the Fourier decomposition. This sets the first periodogram ordinate to 0 rather than to  times the squared mean. This option is commonly used when the periodograms are to be plotted to prevent a large first periodogram ordinate from distorting the scale of the plot. ADJUSTMEAN=YES specifies the series should be transformed by subtracting its mean. ADJUSTMEAN=NO specifies no adjustment of the series should be performed. The default is ADJUSTMEAN=NO.

ALPHA= num

specifies the width of a window drawn around the spectral density estimate in a spectral density versus frequency plot. Based on approximations proposed by Brockwell and Davis (1991), periodogram ordinates fall within this window with a confidence level of . The value must be between 0 and 1; the default is 0.5.

kernel DOMAIN=domain C=c EXP|EXPON=e

specifies the smoothing function used to calculate a spectral density estimate as the moving average of periodogram ordinates. The kernel function is an alternative way to using the WEIGHTS option as a smoothing function. The available kernel values are:

PARZEN

Parzen kernel

BARTLETT

Bartlett kernel

TUKEY

Tukey-Hanning kernel

TRUNC | TRUNCAT

truncated kernel

QS | QUADR

quadratic spectral kernel

The DOMAIN= option specifies how the smoothing function is interpreted. The available domain values are:

FREQUENCY

smooths the periodogram ordinates.

TIME

applies the kernel as a filter to the time series autocovariance function

By default DOMAIN=FREQUENCY, and smoothing is applied in the same manner as weights are applied when the WEIGHTS= option is used. Each of the kernel functions can be further parameterized with a kernel scale factor by using the C= and EXPON= options. A summary of the default values of the kernel scale parameters, and , that are associated with each of the kernel functions together with their kernel scale factor values, , for a series with 100 periodogram ordinates is listed in Table 32.2.

Table 32.2 Default Kernel Scale Factor Parameters

Kernel

Bartlett

2.32

Parzen

2.51

Quadratic

1.26

Tukey-Hanning

1.67

Truncated

0.63

For example, to apply the truncated kernel by using default scale factor parameters in the frequency domain, the following SPECTRA statement could be used:

   spectra / truncat;

Details of the kernel function parameterization and the DOMAIN= option are provided in the section Using Kernel Specifications.

WEIGHTS numlist

specifies the relative weights used in computing a spectral density estimate as the moving average smoothing of periodogram ordinates. If neither a WEIGHTS option nor a kernel function is specified, the spectral density estimate is identical to the unmodified periodogram. The following SPECTRA statement uses the WEIGHTS option to specify equal weighting for each of the three adjacent periodogram ordinates centered on each spectral density estimate:

   spectra / weights 1 1 1;

Further description of how the weights are applied is provided in the section Using Specification of Weight Constants.