See e.g.
[M-5] corr() . . . . . . . . . Make correlation matrix from variance
matrix
(help [M-5] corr())
[M-5] mean() . . . . . . . . . . . . . . Means, variances, and
correlations
(help [M-5] mean())
FAQ . . . . . . . . . . . . . . . . . . . Obtaining the correlation
matrix
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W.
Gould
12/99 How can I obtain the correlation matrix as a Stata
matrix?
http://www.stata.com/support/faqs/stat/rho.html
corrmat from http://www.stata.com/users/sdriver
corrmat. Create and save correlation or covariance matrices. /
Program
by Shannon Driver, StataCorp <[email protected]>. / Creates a
correlation
matrix, covariance matrix, or both and optionally / saves them in
the
return list and/or matrix dir.
cpcorr from http://fmwww.bc.edu/RePEc/bocode/c
'CPCORR': module for correlations for each row vs each column
variable /
cpcorr produces a matrix of correlations for rowvarlist versus /
colvarlist. cpspear does the same for Spearman correlations. This /
matrix
may thus be oblong, and need not be square. Both also / allow a
single
STB-56 dm79 . . . . . . . . . . . . . . . . . . Yet more new matrix
commands
(help matcorr, matewmf, matvsort, svmat2 if installed) . . N.
J. Cox
7/00 pp.4--8; STB Reprints Vol 10, pp.17--23
commands to produce a correlation matrix, elementwise monadic
function of another matrix, selected subsets of matrix rows
and columns, vec or vech of a matrix, elements sorted within
a vector, matrix from a vector, and commands to save matrices
see mata matrix language incorporated into Stata 9.0
David Kantor
How can I capture the covariance matrix of a set of variables?
[...]