Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# st: Calculate average elements matrix (below the diagonal )

 From Dirk Enzmann To statalist@hsphsun2.harvard.edu Subject st: Calculate average elements matrix (below the diagonal ) Date Wed, 12 Sep 2012 10:27:37 +0200

When calculating averages of correlation coefficients (whether absolute or not) you should consider transforming them to Fisher's z-scores first (and the average back), see:
```
http://www.stata-journal.com/article.html?article=pr0041

Dirk

On 12.09.2012 08:33, statalist-digest wrote:
```
```Date: Tue, 11 Sep 2012 10:34:19 +0200
From: John Antonakis<John.Antonakis@unil.ch>
Subject: st: Calculate average elements matrix (below the diagonal )

Hi:

I would like to calculate the average absolute correlations of a
correlation matrix.  E.g.,

sysuse auto
corr price mpg rep78
mat A = r(C)
mat list A

This returns the following three correlations below the diagonal:

- -.45594895 .00655327 .40234039

Specifically, I would like to: obtain the average absolute values of the
below-diagonal elements:

i.e., dis (abs(-.45594895) + abs(.00655327) + abs(.40234039))/3

Thanks!
J.
```
```
--
========================================
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Rothenbaumchaussee 33
D-20148 Hamburg
Germany

phone: +49-(0)40-42838.7498 (office)
+49-(0)40-42838.4591 (Mrs Billon)
fax:   +49-(0)40-42838.2344
email: dirk.enzmann@uni-hamburg.de
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.html
========================================
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```