1. Home
  2. PERIODTEST procedure

PERIODTEST procedure

Gives periodogram-based tests for white noise in time series (R.P. Littlejohn).

Option

LENGTH = scalar or variate Scalar specifying that the first N units of the series are to be used, or a variate specifying the first and last units of the series to be used

Parameters

SERIES = variates Specify the time series to be analysed
PERIODOGRAM = variates Save periodograms of the time series

Description

PERIODTEST gives periodogram-based tests for departure from white noise in a set of time series. The series are supplied in a list of variates, using the SERIES parameter. The LENGTH option can specify that only part of each series is to be used, using either a scalar N to indicate that the first N values are to be used, or a variate of length two, holding the values of the first and last units of the required subseries. This may be used to eliminate missing values, which are otherwise not permitted.

The mean-adjusted periodogram is calculated for each series using FOURIER, and can be saved using the PERIODOGRAM parameter. The maximum periodogram ordinate test, Fisher’s g-test and the Kolmogorov-Smirnov test on the cumulative periodogram are calculated using the standard formulae (Priestley 1981).

The output for each series consists of the value of the maximum periodogram ordinate (after scaling by the length of the analysed series), the frequency at which this maximum occurs (expressed as the unit number in the PERIODOGRAM variate, i.e. if the maximum occurs at ϖ = 2πj/N, then j is given), and the probability of exceeding this maximum; the ratio of the maximum to the total of the periodogram ordinates (Fisher’s g), and the probability of exceeding this; and the Kolmogorov-Smirnov D statistic based on the maximum deviation of the cumulative periodogram from the line y=x.

Option: LENGTH.

Parameters: SERIES, PERIODOGRAM.

Method

The series are mean-corrected, but not trend corrected, before transformation.

Action with RESTRICT

The SERIES may not be restricted; restriction of the input series to a contiguous set of units may be achieved by use of the LENGTH parameter.

Reference

Priestley, M.B. (1981). Spectral Analysis and Time Series. Academic Press, London.

See also

Directive: FOURIER.

Procedures: DFOURIER, MCROSSPECTRUM, REPPERIODOGRAM, SMOOTHSPECTRUM.

Commands for: Time series.

Example

CAPTION    'PERIODTEST example',\ 
           !t('Data from Diggle, P.J. (1990),',\ 
           'Time Series: A Biostatistical Introduction,',\ 
           'Clarendon Press, Oxford, Table A.1 Lutenizing hormone.');\ 
           STYLE=meta,plain
VARIATE    [NVALUES=48] Number,lh[1...4]
READ       Number,lh[1...4]
   1  2.2  5.5  2.4  4.3
   2  2.2  4.5  2.4  4.6
   3  2.3  5.1  2.4  4.7
   4  2.0  5.5  2.2  4.1
   5  1.6  5.7  2.1  4.1
   6  1.4  5.1  1.5  5.2
   7  1.8  4.3  2.3  5.0
   8  2.2  4.8  2.3  4.4
   9  2.9  5.6  2.5  4.2
  10  2.6  5.9  2.0  5.1
  11  2.4  6.0  1.9  5.1
  12  2.1  5.1  1.7  4.7
  13  3.0  5.2  2.2  4.4
  14  2.5  4.4  1.8  3.9
  15  2.7  5.5  3.2  5.4
  16  2.2  5.4  3.2  5.9
  17  2.4  4.1  2.7  4.2
  18  2.7  4.4  2.2  4.1
  19  3.1  4.7  2.2  4.1
  20  2.5  4.6  1.9  3.6
  21  2.4  6.0  1.9  3.1
  22  2.3  5.6  1.8  4.8
  23  2.4  5.1  2.7  5.1
  24  1.9  4.7  3.0  5.1
  25  3.3  4.8  2.3  4.5
  26  3.8  5.5  2.0  4.6
  27  3.7  5.1  2.0  5.8
  28  3.5  5.2  2.9  5.0
  29  3.1  5.0  2.9  5.1
  30  2.7  4.0  2.7  4.5
  31  4.1  3.7  2.7  4.2
  32  4.0  4.8  2.3  6.0
  33  3.4  5.9  2.6  5.6
  34  3.2  5.5  2.4  5.4
  35  3.7  4.9  1.8  5.0
  36  3.6  4.4  1.7  4.4
  37  4.1  4.7  1.5  4.6
  38  2.0  4.2  1.4  5.7
  39  4.6  5.5  2.1  5.2
  40  4.1  4.9  3.3  5.0
  41  3.2  4.8  3.5  4.4
  42  2.9  4.5  3.5  5.7
  43  2.7  4.9  3.1  5.7
  44  3.0  4.9  2.6  4.8
  45  *    4.5  2.1  3.4
  46  *    4.2  3.4  5.5
  47  *    4.9  3.0  5.5
  48  *    5.9  2.9  5.6  :
PERIODTEST lh[2...4]; PERIODOGRAM=Per[2...4]
PRINT      Per[]
PERIODTEST [LENGTH=44] lh[]
Updated on March 6, 2019

Was this article helpful?