The Statistical Software spectrum - version 3.2 ©

The statistical software spectrum - version 3.2 allows to investigate the linear interrelations between the components of a multivariate time series by partial correlation analysis.

Description
Synopsis
Options
Parameterfile
Example
Auxiliary programs
Papers

Description:

The program spectrum computes the (partial) cross spectra, the (partial) phase spectra, the (partial) coherences, and the (partial) correlations for a multivariate time series. The dimension, the length of the series, and the names of the files containing the data have to be specified in the file filename. The syntax of this file is described below.

spectrum provides its results as PostScript figures, which can be displayed or printed using ghostview or lpr, or can be included as EPS files into other documents.

The computation of all partialized statistics is based on an inversion of the matrix of cross spectra and a suitable standardisation of the resulting matrix. For details, we refer to Dahlhaus (2000).

Top


Synopsis:

spectrum [-version] [-paper papertype] [-tmp path] filename

Top


Options:

-version Write message with copyright and version number.
-paper papertype This sets the paper type to papertype. Currently known types are a6 to a3 and letter, default is a4.
-tmp path This sets the directory to use for temporary files to path. If omitted, then /usr/tmp is the default.

Top


Parameter file:

The input and output of spectrum is specified by the following commands which are given in the file filename. Only DIM, LENGTH, and FN must be defined, the other commands are optional. The default values are defined in the file default.h.
DIM n Dimension of time series
LENGTH n Length of time series
RANGE m n For the computations only observations m to n are used. If omitted the full time series is used.
SUBSAMPLING n Definition of subsampling rate: Only every n-th value is used for the computations. If omitted n is set to 1.
SAMPLEFREQ f Sampling rate in Hz: Number of observed values per second.
FREQ f All frequency domain statistics are computed for frequencies from 0 Hz to f Hz.
SEGMENTS n For the estimation of the spectra the time series is partitioned into n segments of equal length. For each segment the periodogram is computed using the FFT and the n periodograms for the different segments are averaged before smoothing. All subsequent steps are the same as in the case n=1 (default).
PATH path Search input files in the directory path. The default is the working directory.
FN ALL filename The time series data are read from the file filename. The components have to be stored columnwise separated by blanks or tabs in ASCII format.
FN n filename The n-th component of the series is read from file filename. To use this command each component of the series must be stored in a different file. This command must nor be used together with FN ALL.
SN n string Specifies the name of the n-th component to be used in the plots.
BINWIDTH f Width of the kernel used for averaging the periodogram. The width must be given in percentage of the computed Fourier frequencies divided by PI.
TAPER f Percentage of tapered data.
STEP n To reduce the size of the PostScript plots and computing time the smoothed periodogram is comuted at only every n-th frequency.
TIME f The (partial) correlations are computed from -f to f seconds.
CONVFACTOR f1 f2 The (partial) spectra are weighted by a convergence factor before the FFT is computed to obtain the (partial) correlations. The convergence factor is constant for frequencies less that f1Hz and monotonically decreasing for frequencies less than f2. If omitted the convergence factor is equal to 1 for all frequencies.
SPEC filename Produce an EPS file filename of the graphs of the computed auto and cross spectra and phase spectra. If SPEC is omitted, the output is skipped.
PSPEC filename Produce an EPS file filename of the graphs of the computed partial auto and cross spectra and partial phase spectra. If SPEC is omitted, the output is skipped.
COH filename Produce an EPS file filename of the graphs of the computed coherences and phase spectra. If COH is omitted, the output is skipped.
PCOH filename [ADDCOH|ADDCOHSEP] Produce an EPS file filename of the graphs of the computed partial coherences and partial phase spectra. ADDCOH adds the coherences as dotted curves. If ADDCOHSEP is used the coherences are plotted above the diagonal and the partial phases are omitted.
CORR filename [ADDCORR|ADDCORRSEP] Produce an EPS file filename of the graphs of the computed correlations.
PCORR filename [ADDCORR|ADDCORRSEP] Produce an EPS file filename of the graphs of the computed partial correlations. ADDCOH adds the correlations as dotted curves, whereas ADDCOHSEP adds the correlations above the diagonal.
THRESHOLD filename [ -options ] Produce a text file filename which contains for each partial coherence an integer with value 0, 1, or 2. In the case of 0 (1), the corresponding partial coherence stays below the first (second) threshold while in the case of 2, the partial coherence exceeds both thresholds. The command can take two options:
h Include three header lines for identifying the partial coherences.
aInstead of overwriting the content of the file filename, the output is appended.
The significance levels for the two thresholds are defined in the file default.h. If THRESHOLD is omitted, the output is skipped.
# [text] Comment which has no effect

Top


Example:

#parameter file - example
DIM 3
LENGTH 500
PATH /usr/name/data/
FN 1 series.ibm
SN 1 ibm
FN 2 series.ms
SN 2 ms
FN 3 series.apple
SN 3 apple
STEP 2
#create only figure of partial coherences
PCOH /usr/name/figures/pcoh.ps
TEXT created by spectrum - 11/13/1996

Top


Auxiliary programs

There are four auxiliary programs which allows to reformat the PostScript files generated by spectrum.
rescale [-(all|lower|upper)] <in.ps> <out.ps> <YMin> <YMax>
Reads the PostScript code in file in.ps and rescales all or part of the graphs to be plotted in the range from YMin to YMax.
If -lower is specified only the plots below the diagonal are rescaled, with analogous results for options -upper resp. -all.
The results are written into the file <out.ps>
extract <in.ps> <out.ps> <x> <y>
Copies only the plot in row y and column x into the output file.
split <in.ps> <n>
Splits the K x K matrix of plots in <in.ps> into n x n files. The output files are named according to the following rule
Name.ps -> Name1.1.ps Name1.2.ps etc.
Name.eps -> Name1.1.eps Name1.2.eps etc.
Name.ext -> Name.ext1.1 Name.ext1.2 etc.
n should be a divisor of K!
color <in.ps> <out.ps> <r1> <g1> <b1> <r2> <g2> <b2>
This program allows coloured curves in the plots. The parameters r1, g1, b1 are the RGB values of the solid curves, the parameters r2, g2, b2 are the RGB values for the dashed curves.

Top


Papers on the subject:

  • R. Dahlhaus, M. Eichler, J. Sandkühler (1997). Identification of synaptic connections in neural ensembles by graphical models. Journal of Neuroscience Methods 77 93-107.
  • R. Dahlhaus (2000), Graphical Interaction Models for Multivariate Time Series, Metrika 51, 157-172.
  • J. Timmer, M. Lauk, B. Köster, B. Hellwig, S. Häußler, B. Guschlbauer, V. Radt, M. Eichler, G. Deuschl, C.H. Lücking (2000). Cross-spectral analysis of tremor time series.International Journal of Bifurcation and Chaos 10, 2595-2610..
  • M. Eichler, R. Dahlhaus, J. Sandkühler (2000), Partial correlation analysis for the identification of synaptic connections, Preprint, University of Heidelberg.

Top