---
name: "gbxcorr"
section: "1"
platform: "linux"
package: "gbutils"
version: "6.3-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gbxcorr"
---

# gbxcorr(1)

Compute cross correlation matrix

## NAME

gbxcorr - Compute cross correlation matrix

## SYNOPSIS

**gbxcorr** \[*options*\]

## DESCRIPTION

Take as input a data matrix A with N rows and T columns

- A = \[ a\_{t,i} \]

  with t=1,..,T  i=1,...,N

and compute the NxN correlation matrix C \[ c\_{i,j} \] following the method specified by option '-M': with method 0 it is

-

  c\_{i,j} = 1/(T-1) \\sum\_t (a\_{t,i}-m\_i) (a\_{t,j}-m\_j)

where m\_i is the i-th mean and with method 1 it is

-

  c\_{i,j} = 1/T \\sum\_t a\_{t,i} a\_{t,j} .

Covariance is stored in the lower triangle while correlation coefficients are stored in the upper triangle.

WARNING: previous implementations were row-wise instead of column-wise

## OPTIONS

- **-M**

  choose the method (default 0)

- 0

  covariance/correlation with mean removal

- 1

  covariance/correlation without mean removal

**-F** specify the input fields separators (default " \\t")

**-h** this help

## AUTHOR

Written by Giulio Bottazzi

## REPORTING BUGS

Report bugs to \<gbutils@googlegroups.com\>

Package home page \<http://cafim.sssup.it/~giulio/software/gbutils/index.html\>

## COPYRIGHT

Copyright © 2001-2018 Giulio Bottazzi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation;

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
