WINDOW Subcommand (SPECTRA command)

WINDOW specifies a spectral window to use when the periodogram is smoothed to obtain the spectral density estimate. If WINDOW is not specified, the Tukey-Hamming window with a span of 5 is used.

  • The specification on WINDOW is a window name and a span in parentheses, or a sequence of user-specified weights.
  • The window name can be any one of the keywords listed below.
  • Only one window keyword is accepted. If more than one keyword is specified, the first keyword is used.
  • The span is the number of periodogram values in the moving average and can be any integer. If an even number is specified, it is decreased by 1.
  • Smoothing near the end of series is accomplished via reflection. For example, if the span is 5, the second periodogram value is smoothed by averaging the first, third, and fourth values and twice the second value.

The following data windows can be specified. Each formula defines the upper half of the window. The lower half is symmetric with the upper half. In all formulas, p is the integer part of the number of spans divided by 2, D p is the Dirichlet kernel of order p, and F p is the Fejer kernel of order p 1.

HAMMING. Tukey-Hamming window.

TUKEY. Tukey-Hanning window.

PARZEN. Parzen window.

BARTLETT. Bartlett window.

UNIT. Equal-weight window. The weights are w k = 1 where k=0, ... p. DANIELL is an alias for UNIT.

NONE. No smoothing. If NONE is specified, the spectral density estimate is the same as the periodogram.

w. User-specified weights. W 0 is applied to the periodogram value that is being smoothed, and the weights on either side are applied to preceding and following values. If the number of weights is even, it is assumed that w p is not supplied. The weight after the middle one is applied to the periodogram value being smoothed. W 0 must be positive.

Example

SPECTRA VARIABLES = VAR01
  /WINDOW=TUKEY(3)
  /PLOT=P S.
  • In this example, the Tukey window weights with a span of 3 are used.
  • The PLOT subcommand plots both the periodogram and the spectral density estimate, both by frequency and period.
1 Priestley, M. B. 1981. Spectral analysis and time series, volumes 1 and 2. London: Academic Press.