Section: User Commands (1)
Return to Main Contents
crosscorr - calculate Pearson's cross-correlation from time-series data
will provide a correlation between two time series or two waveforms.
The observations of one series are correlated with the observations
of another series at various lags and leads.
Cross-correlations help identify variables which are leading indicators
of other variables or how much one variable is predicted to change
in relation the other variable.
In this analysis, the Pearsonâs Product Moment correlation value,
is calculated many times by time-shifting the one data set
relative to the other data set.
Each shift is called a
and the lag time is simply the sampling period of the two time-series
A typical cross-correlation shows enough lags in both negative and positive
directions to show the cyclical relationship of the two sets of data.
argument, which must be specified, gives the name of the ASCII file of
comma-separated values for the two waveforms to be compared.
The input must have at least two columns of numbers, but if it has more you
can specify which ones to use.
If you want to use the standard input, specify
as the input file name.
The output is also an ASCII series of comma-separated values, giving the
lag numbers and corresponding
The output goes to the standard output, which can be piped to another program,
or redirected to a file.
A file name suffix of
is recommended for this output file.
- -x colnum
Specifies the column number for the first variable (default is 1).
- -y colnum
Specifies the column number for the second variable (default is 2).
- -l numlags
Specifies the number of lags to be calculated in either direction
(default is 150).
Causes the program to output a summary of command usage and options.
- crosscorr -l150 apj402-56.csv | genplot -yf- -yc2 -yw0 | xhpgl
Simple plot of cross-correlation of first two columns in data file.
for more information on using crosscorr in a cross-correlation analysis.
- SEE ALSO
This document was created by
using the manual pages.
Time: 19:12:59 GMT, May 23, 2018
Copyright © G. R. Detillieux,
Spinal Cord Research Centre,
The University of Manitoba.