Stata Correlate
-correlate- calculates correlations.
See also -pwcorr-.
Contents
Usage
To calculate the correlation matrix for some varlist, try:
corr varlist matrix cor = r(C)
To calculate the covariance matrix, try:
corr varlist, covariance matrix cov = r(C)
To calculate the precision matrix, follow-up the above with:
matrix invcov = invsym(cov) //note that invsym() is preferred over inv()
Note that this command does not support weights, as it is not an estimation command.