SPECTRA Procedure

Kernels

Kernels are used to smooth the periodogram by using a weighted moving average of nearby points. A smoothed periodogram is defined by the following equation:

StartLayout 1st Row  ModifyingAbove upper J With caret Subscript i Baseline left-parenthesis normal l left-parenthesis q right-parenthesis right-parenthesis equals sigma-summation Underscript tau equals minus normal l left-parenthesis q right-parenthesis Overscript normal l left-parenthesis q right-parenthesis Endscripts normal w left-parenthesis StartFraction tau Over normal l left-parenthesis q right-parenthesis EndFraction right-parenthesis upper J overTilde Subscript i plus tau EndLayout

where normal w left-parenthesis x right-parenthesis is the kernel or weight function. At the endpoints, the moving average is computed cyclically; that is,

StartLayout 1st Row  upper J overTilde Subscript i plus tau Baseline equals StartLayout Enlarged left-brace 1st Row 1st Column upper J Subscript i plus tau Baseline 2nd Column 0 less-than equals i plus tau less-than equals q 2nd Row 1st Column upper J Subscript minus left-parenthesis i plus tau right-parenthesis Baseline 2nd Column i plus tau less-than 0 3rd Row 1st Column upper J Subscript q minus left-parenthesis i plus tau right-parenthesis Baseline 2nd Column i plus tau greater-than q EndLayout EndLayout

The SPECTRA procedure supports the following kernels. They are listed with their default bandwidth functions.

Bartlett: KERNEL BART

StartLayout 1st Row 1st Column normal w left-parenthesis x right-parenthesis 2nd Column equals 3rd Column StartLayout Enlarged left-brace 1st Row 1st Column 1 minus StartAbsoluteValue x EndAbsoluteValue 2nd Column StartAbsoluteValue x EndAbsoluteValue less-than-or-equal-to 1 2nd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 2nd Row 1st Column normal l left-parenthesis q right-parenthesis 2nd Column equals 3rd Column one-half q Superscript 1 slash 3 EndLayout

Parzen: KERNEL PARZEN

StartLayout 1st Row 1st Column normal w left-parenthesis x right-parenthesis 2nd Column equals 3rd Column StartLayout Enlarged left-brace 1st Row 1st Column 1 minus 6 StartAbsoluteValue x EndAbsoluteValue squared plus 6 StartAbsoluteValue x EndAbsoluteValue cubed 2nd Column 0 less-than-or-equal-to StartAbsoluteValue x EndAbsoluteValue less-than-or-equal-to one-half 2nd Row 1st Column 2 left-parenthesis 1 minus StartAbsoluteValue x EndAbsoluteValue right-parenthesis cubed 2nd Column one-half less-than-or-equal-to StartAbsoluteValue x EndAbsoluteValue less-than-or-equal-to 1 3rd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 2nd Row 1st Column normal l left-parenthesis q right-parenthesis 2nd Column equals 3rd Column q Superscript 1 slash 5 EndLayout

Quadratic spectral: KERNEL QS

StartLayout 1st Row 1st Column normal w left-parenthesis x right-parenthesis 2nd Column equals 3rd Column StartFraction 25 Over 12 pi squared x squared EndFraction left-parenthesis StartFraction sine left-parenthesis 6 pi x slash 5 right-parenthesis Over 6 pi x slash 5 EndFraction minus cosine left-parenthesis 6 pi x slash 5 right-parenthesis right-parenthesis 2nd Row 1st Column normal l left-parenthesis q right-parenthesis 2nd Column equals 3rd Column one-half q Superscript 1 slash 5 EndLayout

Tukey-Hanning: KERNEL TUKEY

StartLayout 1st Row 1st Column normal w left-parenthesis x right-parenthesis 2nd Column equals 3rd Column StartLayout Enlarged left-brace 1st Row 1st Column left-parenthesis 1 plus cosine left-parenthesis pi x right-parenthesis right-parenthesis slash 2 2nd Column StartAbsoluteValue x EndAbsoluteValue less-than-or-equal-to 1 2nd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 2nd Row 1st Column normal l left-parenthesis q right-parenthesis 2nd Column equals 3rd Column two-thirds q Superscript 1 slash 5 EndLayout

Truncated: KERNEL TRUNCAT

StartLayout 1st Row 1st Column normal w left-parenthesis x right-parenthesis 2nd Column equals 3rd Column StartLayout Enlarged left-brace 1st Row 1st Column 1 2nd Column StartAbsoluteValue x EndAbsoluteValue less-than-or-equal-to 1 2nd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 2nd Row 1st Column normal l left-parenthesis q right-parenthesis 2nd Column equals 3rd Column one-fourth q Superscript 1 slash 5 EndLayout

A summary of the default values of the bandwidth parameters, c and e, associated with the kernel smoothers in PROC SPECTRA are listed in Table 2.

Table 2: Bandwidth Parameters

Kernel c e
Bartlett 1 slash 2 1 slash 3
Parzen 1 1 slash 5
Quadratic 1 slash 2 1 slash 5
Tukey-Hanning 2 slash 3 1 slash 5
Truncated 1 slash 4 1 slash 5


Figure 1: Kernels for Smoothing

Kernels for Smoothing


For more information about the properties of these kernels, see Andrews (1991).

Last updated: June 19, 2025