Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The SPECTRA Procedure

OUT= Data Set

The OUT= data set contains [n/2]+1 observations, if n is even, or [(n+1)/2] observations, if n is odd, where n is the number of observations in the time series.

The variables in the new data set are named according to the following conventions. Each variable to be analyzed is associated with an index. The first variable listed in the VAR statement is indexed as 01, the second variable as 02, and so on. Output variables are named by combining indexes with prefixes. The prefix always identifies the nature of the new variable, and the indices identify the original variables from which the statistics were obtained.

Variables containing spectral analysis results have names consisting of a prefix, an underscore, and the index of the variable analyzed. For example, the variable S_01 contains spectral density estimates for the first variable in the VAR statement. Variables containing cross-spectral analysis results have names consisting of a prefix, an underscore, the index of the first variable, another underscore, and the index of the second variable. For example, the variable A_01_02 contains the amplitude of the cross-spectral density estimate for the first and second variables in the VAR statement.

Table 17.1 shows the formulas and naming conventions used for the variables in the OUT= data set. Let X be variable number nn in the VAR statement list and let Y be variable number mm in the VAR statement list. Table 17.1 shows the output variables containing the results of the spectral and cross-spectral analysis of X and Y.

In Table 17.1 the following notation is used. Let Wj be the vector of 2p+1 smoothing weights given by the WEIGHTS statement, normalized to sum to {\frac{1}{4{\pi}}}. The subscript of Wj runs from W-p to Wp, so that W0 is the middle weight in the WEIGHTS statement list. Let {{\omega}_{k} = \frac{2{\pi}k}n}, where k = 0, 1, ... , floor( [n/2] ).

Table 17.1: Variables Created by PROC SPECTRA

Variable Description
  
FREQfrequency in radians from 0 to {\pi}
 (Note: Cycles per observation is \frac{{\rm FREQ}}{2{\pi}}.)
  
PERIODperiod or wavelength: \frac{2{\pi}}{{\rm FREQ}}
 (Note: PERIOD is missing for FREQ=0.)
  
COS_Xcosine transform of X: { a^x_{k}=\frac{2}n \sum_{t=1}^n{X_{t} {\rm cos}({\omega}_{k}(t-1))}}
COS_WAVE 
  
SIN_Xsine transform of X: { b^x_{k}=\frac{2}n \sum_{t=1}^n{X_{t} {\rm sin}({\omega}_{k}(t-1))}}
SIN_WAVE 
  
P_nnperiodogram of X: Jxk = [n/2] [(axk)2 + ( bxk)2]
  
S_nnspectral density estimate of X: { F^x_{k}=\sum_{j=-p}^p{W_{j} J^x_{k+j}}}
 (except across endpoints)
  
RP_nn_mmreal part of cross-periodogram X and Y: real( Jxyk) = [n/2] ( axk ayk + bxk byk)
  
IP_nn_mmimaginary part of cross-periodogram of X and Y:
 imag( Jxyk) = [n/2] ( axk byk - bxk ayk)
  
CS_nn_mmcospectrum estimate (real part of cross-spectrum) of X and Y:
 { C^{xy}_{k}=\sum_{j=-p}^p{W_{j}\rm{real}( J^{xy}_{k+j})}}          (except across endpoints)
  
QS_nn_mmquadrature spectrum estimate (imaginary part of cross-spectrum) of X and Y:
 { Q^{xy}_{k}=\sum_{j=-p}^p{W_{j} \rm{imag}( J^{xy}_{k+j})}}          (except across endpoints)
  
A_nn_mmamplitude (modulus) of cross-spectrum of X and Y: { A^{xy}_{k}=\sqrt{ {(C^{xy}_{k})}^2 + {(Q^{xy}_{k})}^2} }
  
K_nn_mmcoherency squared of X and Y: Kxyk= (Axyk)2 / ( Fxk Fyk)
  
PH_nn_mmphase spectrum in radians of X and Y: { {\Phi}^{xy}_{k}=\arctan( Q^{xy}_{k} / C^{xy}_{k} )}
  

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.