Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: storing correlations

From   Kit Baum <>
Subject   st: Re: storing correlations
Date   Wed, 23 May 2007 07:52:57 -0400

sacrificial complex eigenvalue

No way to directly store a matrix of correlations in a variable, but you can store them as a matrix:

mat accum cov = var1 var2 var3, noco dev
mat corr = corr(cov)
mat list corr

Now if you really wanted them stored in a variable,

matvech corr veccorr (using matvech from dm79, by N J Cox)
svmat veccorr
list veccorr1 if veccorr1 < .

One could also do this in Mata very easily.

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

On May 23, 2007, at 2:33 AM, statalist-digest wrote:

I want to store the correlation coefficient into a
variable. After I run corr var1 var2 var3
i see the correlation coefficient output table. I
searched online and it is said the correlate result
should be stored in matrix rho(r), but when I tried in
stata 9. I can't find it. Could anyone please help me
on this. many thanks in advance
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index