More Correlation Coefficients
use http://www.philender.com/courses/data/hsb2, clear corr write ses prog | write ses prog ---------+--------------------------- write | 1.0000 ses | 0.2075 1.0000 prog | -0.1811 0.0173 1.0000 Do these correlations make sense? What kind of variable is ses? prog? tab1 ses prog -> tabulation of ses ses | Freq. Percent Cum. ------------+----------------------------------- low | 47 23.50 23.50 middle | 95 47.50 71.00 high | 58 29.00 100.00 ------------+----------------------------------- Total | 200 100.00 -> tabulation of prog type of | program | Freq. Percent Cum. ------------+----------------------------------- general | 45 22.50 22.50 academic | 105 52.50 75.00 vocation | 50 25.00 100.00 ------------+----------------------------------- Total | 200 100.00 spearman write ses Number of obs = 200 Spearman's rho = 0.2224 Test of Ho: write and ses independent Pr > |t| = 0.0016
regress write read Source | SS df MS Number of obs = 200 ---------+------------------------------ F( 1, 198) = 109.52 Model | 6367.42127 1 6367.42127 Prob > F = 0.0000 Residual | 11511.4537 198 58.1386552 R-squared = 0.3561 ---------+------------------------------ Adj R-squared = 0.3529 Total | 17878.875 199 89.843593 Root MSE = 7.6249 ------------------------------------------------------------------------------ write | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- read | .5517051 .0527178 10.465 0.000 .4477446 .6556656 _cons | 23.95944 2.805744 8.539 0.000 18.42647 29.49242 ------------------------------------------------------------------------------ regress write read female Source | SS df MS Number of obs = 200 ---------+------------------------------ F( 2, 197) = 77.21 Model | 7856.32118 2 3928.16059 Prob > F = 0.0000 Residual | 10022.5538 197 50.8759077 R-squared = 0.4394 ---------+------------------------------ Adj R-squared = 0.4337 Total | 17878.875 199 89.843593 Root MSE = 7.1327 ------------------------------------------------------------------------------ write | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- read | .5658869 .0493849 11.459 0.000 .468496 .6632778 female | 5.486894 1.014261 5.410 0.000 3.48669 7.487098 _cons | 20.22837 2.713756 7.454 0.000 14.87663 25.58011 ------------------------------------------------------------------------------
corr write female read (obs=200) | write female read ---------+--------------------------- write | 1.0000 female | 0.2565 1.0000 read | 0.5968 -0.0531 1.0000 pcorr write female read (obs=200) Partial correlation of write with Variable | Corr. Sig. ---------+------------------ female | 0.3596 0.000 read | 0.6324 0.000
Intro Home Page
Phil Ender, 15Jan98