Stata Technical Bulletin
STB-8
print (#) specifies the significance level of correlation coefficients to be printed. Correlation coefficients with larger significance
levels are left blank in the matrix. Typing ‘pwcorr, print(.10)’ would list only correlation coefficients significant at the
10% level or better.
star(#) specifies the significance level of correlation coefficients to be starred. Typing ‘pwcorr, star(.05)’ would star all
correlation coefficients significant at the 5% level or better.
bonferroni makes the Bonferroni adjustment to calculated significance levels. This affects printed significance levels and the
print() and star() options. Thus, ‘pwcorr, print(.05) bonferroni’ prints coefficients with Bonferroni-adjusted
significance levels of .05 or less.
sidak makes the Sidak adjustment to calculated significance levels. This affects printed significance levels and the print ()
and star() options. Thus, ‘pwcorr, print(.05) sidak’ prints coefficients with Sidak-adjusted significance levels of .05
or less.
Examples
. pwcorr mpg price rep7S for, obs sig
I mpg price rep7S foreign
-------+------------------------------------
mpg I 1.0000
I
I 74
I
price I -0.4594 1.0000
I 0.0000
I 74 74
rep7S I I I |
0.3739 0.0016 69 |
0.0066 0.9574 69 |
1.0000 69 |
I |
0.3613 |
0.0487 |
0.5922 1.0000 |
I |
0.0016 |
0.6802 |
0.0000 |
I |
74 |
74 |
69 74 |
. pwcorr mpg |
price hdroom rseat |
trun rep78 for, print(.05) star(.01) | |
I |
mpg |
price |
hdroom rseat trunk rep78 foreign |
— — ——— — ——— —-f-—- |
— | ||
≡pg I |
1.0000 | ||
price I |
-0.4594* |
1.0000 | |
hdroom I |
-0.4220* |
1.0000 | |
rseat I |
-0.5213* |
0.4194* |
0.5238* 1.0000 |
trunk I |
-0.5703* |
0.3143* |
0.6620* 0.6480* 1.0000 |
rep78 I |
0.3739* |
1.0000 | |
foreign I |
0.3613* |
- |
-0.2938 -0.2409 -0.3594* 0.5922* 1.0000 |
. pwcorr mpg |
price hdroom rseat |
trun rep78 for, print(.05) bon | |
I |
mpg |
price |
hdroom rseat trunk rep78 foreign |
— | |||
≡pg I |
1.0000 | ||
price I |
-0.4594 |
1.0000 | |
hdroom I |
-0.4220 |
1.0000 | |
rseat I |
-0.5213 |
0.4194 |
0.5238 1.0000 |
trunk I |
-0.5703 |
0.6620 0.6480 1.0000 | |
rep7S I |
0.3739 |
1.0000 | |
foreign I |
0.3613 |
-0.3594 0.5922 1.0000 |
Methods and Formulas
Each correlation coefficient is calculated as described in [5s] correlate.
Let r be a calculated correlation coefficient and n the number of observations over which it is calculated. The unadjusted
significance level is calculated as p = invt(n — 2,r*sqrt(l-r2)).
Let V be the number of variables specified; then к = v(v -1)/2 correlation coefficients are to be estimated.
If bonferroni is specified, the adjusted significance level is p' = min(1, к × p). If sidak is specified, p' = min (1,1 —
(1 ~P)n}. In both cases, see Methods and Formulas in [5s] oneway for a more complete description of the logic behind these
adjustments.