Title

intercorr -- Correlate two sets of values

Syntax

intercorr [corr-stat] [if] [in], a(varelist) b(varelist) [ options ]

where corr-stat is one of:

pearson or r

spearman or rho

kendall or tau

options

adjust adjust the p-values for the number of comparisons

n report n for each correlation

stars[(plevels)] Report p-level as a number of stars (categories)

nop Do not report the numeric p-level

nostat Do not report the correlation statistic

save(name) Save the correlation data in a mata variable

Description

intercorr produces a table of correlations, of a-variables vs. b-variables.

Options

adjust multiplies the reported p-values by the number of comparisons; ie, it applies the bonferroni correction.

stars[(p categories)] appends a number of stars to the correlation coefficient, depending on the significance level.

When one or more categories are supplied, p-levels equal to or lower than the first category will get one star, those equal to or lower than the second category will get two stars, etc.

When no parameter is supplied, (ie, stars), the values .05 .01 .001 are used.

save(name) creates name as a Mata global array. The array includes the keys rowvars, colvars, n, stat, and p -- each key retrieving the appropriate data.