FEJER
This function computes the Fejér kernel.
Function Return Value
FEJER — Function value. (Output)
Required Arguments
M — Spectral window parameter. (Input)
RANGLE — Angle in radians. (Input)
EPS — Positive bound on RANGLE that determines when an approximation to the Fejér kernel is appropriate. (Input)
EPS must be between 0 and π inclusive. The approximation is used when RANGLE is less than EPS.
FORTRAN 90 Interface
Generic: FEJER(M, RANGLE, EPS)
Specific: The specific interface names are S_FEJER and D_FEJER.
FORTRAN 77 Interface
Single: FEJER(M, RANGLE, EPS)
Double: The double precision name is DFEJER.
Description
Routine FEJER evaluates the Fejér kernel, FM(θ), for a given parameter M, angle θ = RANGLE, and tolerance ɛ = EPS. The computational form of the function is given by
The first case is an approximation to FM(θ) for small θ, and the second case is the usual theoretical definition.
In spectral analysis, the Fejér kernel corresponds to the modified Bartlett spectral window, and M is called the spectral window parameter. Since the Fejér kernel is nonnegative for all values of θ, the modified Bartlett estimate of the spectral density is also nonnegative. This is a desirable property since the true spectral density is a nonnegative function. See Priestley (1981, pages 439–440) and Anderson (1971, pages 508–511) for further discussion.
Comments
1. The Fejér kernel is equivalent to the modified Bartlett spectral window. The spectral window parameter denotes the truncation point in the weighted sum of sample autocovariances used to estimate the spectral density.
2. The Fejér kernel produces nonnegative values for all values of RANGLE. Thus, spectral windows based on the Fejér kernel are always nonnegative.
3. The Fejér kernel is defined between π and π, inclusive, and is zero otherwise.
Example
In this example, FEJER is used to compute the Fejér kernel at θ = ±kπ/M for k = 0, 1, M where M = 11 and ɛ = 0.01.
 
USE UMACH_INT
USE FEJER_INT
 
IMPLICIT NONE
INTEGER K, M, NOUT
REAL EPS, PI, REAL, THETA, WT
INTRINSIC REAL
!
M = 11
EPS = .01
PI = 3.14159265
CALL UMACH (2, NOUT)
!
WRITE (NOUT,99998)
99998 FORMAT (' K THETA WEIGHT ')
DO 10 K=0, M
THETA = (PI*REAL(K))/REAL(M)
WT = FEJER(M,THETA,EPS)
WRITE (NOUT,99999) K, THETA, WT
99999 FORMAT (1X, I2, 2(3X,F8.5))
10 CONTINUE
!
END
Output
 
K THETA WEIGHT
0 0.00000 1.75070
1 0.28560 0.71438
2 0.57120 0.00000
3 0.85680 0.08384
4 1.14240 0.00000
5 1.42800 0.03374
6 1.71360 0.00000
7 1.99920 0.02044
8 2.28479 0.00000
9 2.57039 0.01572
10 2.85599 0.00000
11 3.14159 0.00000