CROSSCORR
Home ›
Software ›
Manual Pages ›
CROSSCORR
Section: User Commands (1)
Updated:
Index
Return to Main Contents
NAME
crosscorr - calculate Pearson's cross-correlation from time-series data
SYNOPSIS
crosscorr
[-x colnum]
[-y colnum]
[-l numlags]
csvfile
>
output.csv
DESCRIPTION
Crosscorr
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,
r,
is calculated many times by time-shifting the one data set
relative to the other data set.
Each shift is called a
lag,
and the lag time is simply the sampling period of the two time-series
data sets.
A typical cross-correlation shows enough lags in both negative and positive
directions to show the cyclical relationship of the two sets of data.
The
csvfile
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
r
value.
The output goes to the standard output, which can be piped to another program,
or redirected to a file.
A file name suffix of
.csv
is recommended for this output file.
Options
- -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).
- --help
-
Causes the program to output a summary of command usage and options.
EXAMPLES
- crosscorr -l150 apj402-56.csv | genplot -yf- -yc2 -yw0 | xhpgl
-
Simple plot of cross-correlation of first two columns in data file.
SEE ALSO
getwfdata(1),
genplot(1)
- http://www.scrc.umanitoba.ca/doc/tutorial/tutorial_14.html
-
for more information on using crosscorr in a cross-correlation analysis.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- Options
-
- EXAMPLES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 17:58:03 GMT, February 20, 2019
Copyright © G. R. Detillieux,
Spinal Cord Research Centre,
The University of Manitoba.