The SPECTRA Procedure

WEIGHTS Statement

WEIGHTS weight-constants | kernel-specification ;

The WEIGHTS statement specifies the relative weights used in the moving average applied to the periodogram ordinates to form the spectral density estimates. A WEIGHTS statement must be used to produce smoothed spectral density estimates. You can specify the relative weights in two ways: you can specify them explicitly as explained in the section Using Weight Constants Specification, or you can specify them implicitly by using the kernel specification as explained in the section Using Kernel Specifications. If the WEIGHTS statement is not used, only the periodogram is produced.

Using Weight Constants Specification

Any number of weighting constants can be specified. The constants should be positive and symmetric about the middle weight. The middle constant (or the constant to the right of the middle if an even number of weight constants are specified) is the relative weight of the current periodogram ordinate. The constant immediately following the middle one is the relative weight of the next periodogram ordinate, and so on. The actual weights used in the smoothing process are the weights specified in the WEIGHTS statement scaled so that they sum to ${\frac{1}{4{\pi }}}$.

The moving average reflects at each end of the periodogram. The first periodogram ordinate is not used; the second periodogram ordinate is used in its place.

For example, a simple triangular weighting can be specified using the following WEIGHTS statement:

   weights 1 2 3 2 1;

Using Kernel Specifications

You can specify five different kernels in the WEIGHTS statement. The syntax for the statement is


where ${c >= 0}$ and ${e >= 0}$ are used to compute the bandwidth parameter as

\[  \mr {l}(q) = c q^{e}  \]

and ${q}$ is the number of periodogram ordinates +1:

\[  q = \mr {floor}(n/2) + 1  \]

To specify the bandwidth explicitly, set ${c =}$ to the desired bandwidth and ${e = 0}$.

For example, a Parzen kernel can be specified using the following WEIGHTS statement:

   weights parzen 0.5 0;

For details, see the section Kernels.