[Stata Program]              
  
input id stot ntread ntmath ntwrt ntsci
  20386 2533.33 2.00 1.00 1.00 3.00
  20743 2700.00 1.00 2.00 1.00 3.00
  39223 6500.00 3.00 3.00 3.00 3.00
   9990 2000.00 2.00 1.00 1.00 2.00
  20503  933.33 2.00 1.00 1.00 2.00
  7223  4233.33 2.00 1.00 1.00 2.00
  5096  2933.33 3.00 3.00 2.00 3.00
 999999  .      2.00 3.00 2.00 3.00
     50  .      1.00 1.00 1.00 1.00
 999998  .      1.00 1.00 1.00 2.00
   5920 666.67  1.00 1.00 1.00 2.00
  42048  .      3.00 3.00 3.00 3.00
 999997  .      1.00 1.00 1.00 2.00
   5202 2666.67 3.00 3.00 2.00 3.00
   6607 3400.00 3.00 3.00 3.00 3.00
   6064 4700.00 3.00 3.00 2.00 3.00
    548  566.67 1.00 1.00 1.00 2.00
   4676 2600.00 2.00 2.00 2.00 3.00
   6754 2466.67 2.00 3.00 2.00 3.00
  40759 5066.67 2.00 3.00 3.00 3.00
 999996  .      3.00 3.00 3.00 3.00
     73 3766.67 2.00 1.00 1.00 2.00
  38654  .      2.00 1.00 2.00 2.00
  20308 3000.00 2.00 2.00 2.00 3.00
   8049 2859.40 1.00 1.00 1.00 1.00
 999995  .      2.00 1.00 1.00 2.00
   6300 1866.67 1.00 2.00 1.00 2.00
   6022  992.73 1.00 2.00 1.00 2.00
   3328 1494.55 1.00 2.00 1.00 2.00
   6480 3000.00 3.00 3.00 2.00 3.00
  69064  .      3.00 3.00 3.00 3.00
   5703 3000.00 2.00 1.00 1.00 2.00
 999994  .      1.00 1.00 1.00 1.00
end
  
label variable stot "total standardized test score"
label variable ntread "teacher rating of student in reading"
label variable ntmath "teacher rating of student in math"
label variable ntwrt "teacher rating of student in writing"
label variable ntsci "teacher rating of student in science"
  
regress stot ntread ntmath ntwrt ntsci
vif
correlate stot ntread ntmath ntwrt ntsci if stot !=.
regress ntread ntmath ntwrt ntsci if stot !=.
regress ntmath ntwrt ntsci ntread if stot !=.
regress ntwrt ntsci ntread ntmath if stot !=.
regress ntsci ntread ntmath ntwrt if stot !=.
sw regress stot ntread ntmath ntwrt ntsci, pe(.05)
generate stotnew=stot
replace stotnew=1300.721*ntwrt + 744.3796 if stot ==.
generate group=2
replace group=1 if stot ==.
ttest stotnew, by(group)
ttest ntread, by(group)
ttest ntmath, by(group)
ttest ntwrt, by(group)
ttest ntsci, by(group)
  
[Stata Output]
 
regress stot ntread ntmath ntwrt ntsci
 
      Source |       SS       df       MS              Number of obs =      23
-------------+------------------------------           F(  4,    18) =    4.56
       Model |  22994242.6     4  5748560.66           Prob > F      =  0.0102
    Residual |  22679651.4    18  1259980.63           R-squared     =  0.5034
-------------+------------------------------           Adj R-squared =  0.3931
       Total |  45673894.0    22  2076086.09           Root MSE      =  1122.5

------------------------------------------------------------------------------
        stot |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      ntread |    640.076   455.9313     1.40   0.177    -317.8002    1597.952
      ntmath |  -346.3548   519.7406    -0.67   0.514    -1438.289    745.5797
       ntwrt |   1335.012   650.5975     2.05   0.055     -31.8431    2701.866
       ntsci |   -276.631   652.4119    -0.42   0.677    -1647.298    1094.036
       _cons |   801.5994   1081.488     0.74   0.468    -1470.522    3073.721
------------------------------------------------------------------------------
 
vif
 
    Variable |       VIF       1/VIF  
-------------+----------------------
       ntwrt |      3.91    0.255465
      ntmath |      3.64    0.275077
       ntsci |      2.61    0.382497
      ntread |      2.14    0.467818
-------------+----------------------
    Mean VIF |      3.08
 
correlate stot ntread ntmath ntwrt ntsci if stot !=.
(obs=23)
 
             |     stot   ntread   ntmath    ntwrt    ntsci
-------------+---------------------------------------------
        stot |   1.0000
      ntread |   0.6098   1.0000
      ntmath |   0.4655   0.6043   1.0000
       ntwrt |   0.6570   0.6971   0.8228   1.0000
       ntsci |   0.4321   0.6469   0.7401   0.7142   1.0000
 
regress ntread ntmath ntwrt ntsci if stot !=.
 
      Source |       SS       df       MS              Number of obs =      23
-------------+------------------------------           F(  3,    19) =    7.20
       Model |  6.89523278     3  2.29841093           Prob > F      =  0.0020
    Residual |  6.06128896    19  .319015209           R-squared     =  0.5322
-------------+------------------------------           Adj R-squared =  0.4583
       Total |  12.9565217    22  .588932806           Root MSE      =  .56481

------------------------------------------------------------------------------
      ntread |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      ntmath |  -.0497051   .2612746    -0.19   0.851    -.5965592    .4971489
       ntwrt |   .5419124   .3028424     1.79   0.090     -.091944    1.175769
       ntsci |   .4165965   .3140605     1.33   0.200    -.2407398    1.073933
       _cons |   .1731255   .5427322     0.32   0.753    -.9628261    1.309077
------------------------------------------------------------------------------

regress ntmath ntwrt ntsci ntread if stot !=.

      Source |       SS       df       MS              Number of obs =      23
-------------+------------------------------           F(  3,    19) =   16.69
       Model |  12.2921781     3  4.09739271           Prob > F      =  0.0000
    Residual |   4.6643436    19  .245491768           R-squared     =  0.7249
-------------+------------------------------           Adj R-squared =  0.6815
       Total |  16.9565217    22  .770750988           Root MSE      =  .49547

------------------------------------------------------------------------------
      ntmath |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ntwrt |   .7437601   .2309885     3.22   0.005     .2602957    1.227225
       ntsci |   .4756888   .2664986     1.78   0.090    -.0820992    1.033477
      ntread |  -.0382496   .2010586    -0.19   0.851    -.4590702     .382571
       _cons |  -.3116694   .4719882    -0.66   0.517    -1.299552    .6762132
------------------------------------------------------------------------------
 
regress ntwrt ntsci ntread ntmath if stot !=.
 
      Source |       SS       df       MS              Number of obs =      23
-------------+------------------------------           F(  3,    19) =   18.46
       Model |  8.67544657     3  2.89181552           Prob > F      =  0.0000
    Residual |  2.97672735    19   .15666986           R-squared     =  0.7445
-------------+------------------------------           Adj R-squared =  0.7042
       Total |  11.6521739    22  .529644269           Root MSE      =  .39582
 
------------------------------------------------------------------------------
       ntwrt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ntsci |   .1336367   .2280035     0.59   0.565    -.3435801    .6108536
      ntread |   .2661357   .1487273     1.79   0.090    -.0451541    .5774255
      ntmath |   .4746587    .147414     3.22   0.005     .1661176    .7831998
       _cons |  -.2153496    .378144    -0.57   0.576    -1.006814    .5761148
------------------------------------------------------------------------------
 
regress ntsci ntread ntmath ntwrt if stot !=.
 
      Source |       SS       df       MS              Number of obs =      23
-------------+------------------------------           F(  3,    19) =   10.22
       Model |  4.77893706     3  1.59297902           Prob > F      =  0.0003
    Residual |  2.96019338    19  .155799651           R-squared     =  0.6175
-------------+------------------------------           Adj R-squared =  0.5571
       Total |  7.73913043    22  .351778656           Root MSE      =  .39471
 
------------------------------------------------------------------------------
       ntsci |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      ntread |   .2034561   .1533799     1.33   0.200    -.1175717    .5244839
      ntmath |   .3018926   .1691315     1.78   0.090    -.0521037    .6558889
       ntwrt |   .1328945   .2267371     0.59   0.565    -.3416718    .6074607
       _cons |   1.281526   .2412229     5.31   0.000     .7766411    1.786412
------------------------------------------------------------------------------
 
collin ntread ntmath ntwrt ntsci if stot!=.  /* user written program: findit collin */
 
  Collinearity Diagnostics
 
                        SQRT                           Cond        R-
  Variable       VIF    VIF    Tolerance  Eigenval     Index    Squared
------------------------------------------------------------------------
    ntread      2.14    1.46    0.4678     3.1168     1.0000     0.5322
    ntmath      3.64    1.91    0.2751     0.4202     2.7235     0.7249
     ntwrt      3.91    1.98    0.2555     0.3048     3.1979     0.7445
     ntsci      2.61    1.62    0.3825     0.1582     4.4382     0.6175
------------------------------------------------------------------------
  Mean VIF      3.08              Condition Number    4.4382
                 Determinant of correlation matrix    0.0632
 
sw regress stot ntread ntmath ntwrt ntsci, pe(.05)
 
                      begin with empty model
p = 0.0007 <  0.0500  adding   ntwrt
 
      Source |       SS       df       MS              Number of obs =      23
-------------+------------------------------           F(  1,    21) =   15.95
       Model |  19714026.3     1  19714026.3           Prob > F      =  0.0007
    Residual |  25959867.7    21  1236184.18           R-squared     =  0.4316
-------------+------------------------------           Adj R-squared =  0.4046
       Total |  45673894.0    22  2076086.09           Root MSE      =  1111.8
 
------------------------------------------------------------------------------
        stot |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       ntwrt |   1300.721   325.7153     3.99   0.001     623.3591    1978.083
       _cons |   744.3796   560.0524     1.33   0.198    -420.3131    1909.072
------------------------------------------------------------------------------
 
generate stotnew=stot
replace stotnew=1300.721*ntwrt + 744.3796 if stot ==.
generate group=2
replace group=1 if stot ==.
 
ttest stotnew, by(group)
 
Two-sample t test with equal variances
 
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       1 |      10    3085.677    377.9807     1195.28    2230.625    3940.729
       2 |      23    2780.291    300.4407    1440.863    2157.215    3403.367
---------+--------------------------------------------------------------------
combined |      33    2872.832    236.7355    1359.942    2390.618    3355.047
---------+--------------------------------------------------------------------
    diff |            305.3865    520.4864               -756.1526    1366.926
------------------------------------------------------------------------------
Degrees of freedom: 31
 
                      Ho: mean(1) - mean(2) = diff = 0

     Ha: diff < 0               Ha: diff ~= 0              Ha: diff > 0
       t =   0.5867                t =   0.5867              t =   0.5867
   P < t =   0.7192          P > |t| =   0.5616          P > t =   0.2808
 
ttest ntread, by(group)
 
Two-sample t test with equal variances
 
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       1 |      10         1.9    .2768875     .875595    1.273637    2.526363
       2 |      23    1.956522     .160018    .7674196    1.624665    2.288379
---------+--------------------------------------------------------------------
combined |      33    1.939394    .1372028    .7881701    1.659921    2.218867
---------+--------------------------------------------------------------------
    diff |           -.0565217    .3031543               -.6748091    .5617656
------------------------------------------------------------------------------
Degrees of freedom: 31

                      Ho: mean(1) - mean(2) = diff = 0

     Ha: diff < 0               Ha: diff ~= 0              Ha: diff > 0
       t =  -0.1864                t =  -0.1864              t =  -0.1864
   P < t =   0.4267          P > |t| =   0.8533          P > t =   0.5733
 
ttest ntmath, by(group)
 
Two-sample t test with equal variances
 
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       1 |      10         1.8    .3265986    1.032796    1.061183    2.538817
       2 |      23    1.956522    .1830599    .8779242    1.576879    2.336165
---------+--------------------------------------------------------------------
combined |      33    1.909091    .1590909    .9139077    1.585033    2.233148
---------+--------------------------------------------------------------------
    diff |           -.1565217    .3505886               -.8715519    .5585084
------------------------------------------------------------------------------
Degrees of freedom: 31

                      Ho: mean(1) - mean(2) = diff = 0

     Ha: diff < 0               Ha: diff ~= 0              Ha: diff > 0
       t =  -0.4465                t =  -0.4465              t =  -0.4465
   P < t =   0.3292          P > |t| =   0.6584          P > t =   0.6708
 
ttest ntwrt, by(group)
  
Two-sample t test with equal variances
 
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       1 |      10         1.8    .2905933    .9189366    1.142632    2.457368
       2 |      23    1.565217    .1517498    .7277666    1.250508    1.879927
---------+--------------------------------------------------------------------
combined |      33    1.636364    .1363636    .7833495      1.3586    1.914127
---------+--------------------------------------------------------------------
    diff |            .2347826    .2985053                -.374023    .8435882
------------------------------------------------------------------------------
Degrees of freedom: 31
 
                      Ho: mean(1) - mean(2) = diff = 0

     Ha: diff < 0               Ha: diff ~= 0              Ha: diff > 0
       t =   0.7865                t =   0.7865              t =   0.7865
   P < t =   0.7812          P > |t| =   0.4375          P > t =   0.2188
  
ttest ntsci, by(group)
 
Two-sample t test with equal variances
 
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       1 |      10         2.2    .2494438    .7888106    1.635719    2.764281
       2 |      23    2.478261    .1236718    .5931093    2.221781    2.734741
---------+--------------------------------------------------------------------
combined |      33    2.393939     .114642    .6585682    2.160421    2.627458
---------+--------------------------------------------------------------------
    diff |           -.2782609    .2484711               -.7850211    .2284994
------------------------------------------------------------------------------
Degrees of freedom: 31
 
                      Ho: mean(1) - mean(2) = diff = 0

     Ha: diff < 0               Ha: diff ~= 0              Ha: diff > 0
       t =  -1.1199                t =  -1.1199              t =  -1.1199
   P < t =   0.1357          P > |t| =   0.2714          P > t =   0.8643