Nonparametric Spectrum Estimates
Recall:
2
I !j
dc !j + ds !j
12 f !j =
12 f !j 2
approximately 22;
and I (!1), I (!2), . . . , I (!m) are approximately independent.
Problem:
I !j is an approximately unbiased estimator of
f !j , but with too few degrees of freedom to be useful.
Solution: Pool!
1
Frequency bands
If n is large, the Fourier frequencies are close together, and
a small interval, or frequency band, will contain several of
them.
If f (!) is smooth, it doesn't change much over a small interval.
So a small interval gives several periodogram values, all estimating approximately the same quantity, and approximately
independent.
2
Averaged Periodogram
h
i
Use the band !j m; !j +m , containing L = 2m + 1 Fourier
frequencies:
m X
1
f !j =
I !j +k :
L k= m
To the same approximation as before,
2Lf(!) 2 :
2L
f (! )
3
Computing the Averaged Periodogram
In R:
k = kernel("daniell", m = 4)
soi.ave = spectrum(soi, k, fast = FALSE, detrend = FALSE, taper = 0)
In SAS:
proc spectra data = soi p s;
var soi;
weights 1 1 1 1 1 1 1 1 1;
run;
4
Pointwise Condence Limits
Condence limits from 2 approximation:
plotspectrum(soi.ave, log = "n", ci = 0.95, ci.type = "chisquare")
Condence limits from log-Normal
h iapproximation (that is, a
Normal approximation to log f !j ):
plotspectrum(soi.ave, log = "n", ci = 0.95, ci.type = "lognormal")
Note: these are pointwise, or per-frequency, 95% condence
limits; we expect 5% of them not to cover the true spectrum.
Simultaneous condence intervals can also be constructed,
but are much wider.
5
Smoothing the Periodogram
Why use unweighted average?
{ optimal weighting if all values really estimate the same
quantity;
{ but values at the ends of the interval may be less relevant.
Alternative: weighted average,
f^ !j =
with h k = hk > 0 and
m
X
hk I !j +k ;
k= m
k hk = 1.
P
6
Computing the Smoothed Periodogram
In R:
{ the kernel(...) function has various options. E.g. for
triangular weights:
k = kernel("daniell", m = c(4, 4));
plot(k);
{ for convolutions of modied Daniell kernels:
k = kernel("modified.daniell", m = c(6, 9))
soi.md = spectrum(soi, k, fast = FALSE, detrend = FALSE, taper = 0)
7
In SAS:
{ the weights statement can likewise be used to create an
arbitrary kernel:
proc spectra data = soi p s;
var soi;
weights 1 2 3 4 5 4 3 2 1;
run;
(proc
spectra
normalizes the weights to sum to 1=(4));
{ the weights statement can also be used to create some
standard kernels:
weights parzen 0.5 0;
8
Example:
proc spectra
program and output.
9
Seasonally Adjusted SOI
The Southern Oscillation Index data provided by Shumway
and Stoer is not seasonally adjusted, which explains the
substantial peaks in the periodogram at the annual frequency.
So the series is non-stationary, and has neither an autocovariance function nor a spectral density function.
A more sensible analysis uses the seasonally adjusted series:
soiAdj = residuals(lm(soi ~ as.factor(cycle(soi))))
soiAdj = ts(soiAdj, frequency = frequency(soi), start = start(soi))
10
k = kernel("modified.daniell", m = c(6, 9))
soiAdj.md = spectrum(soiAdj, k, fast = FALSE, detrend = FALSE, taper = 0)
plotspectrum(soiAdj.md, log = "n", ci = 0.95, ci.type = "chisquare",
unit.time = "year")
Period in years
1
0.5
1
2
0.25
0.167
0.00 0.02 0.04 0.06 0.08
s(f)
2
0
3
4
5
6
Frequency in cycles per year
11
plotspectrum(soiAdj.md, log = "n", ci = 0.95, ci.type = "lognormal",
unit.time = "year")
Period in years
1
0.5
1
2
0.25
0.167
0.04
0.02
0.00
s(f)
0.06
0.08
2
0
3
4
5
6
Frequency in cycles per year
12
© Copyright 2026 Paperzz