------------------------------------------------------------------------------------------------------
       log:  T:\schmidt-stata\manuf1.log
  log type:  text
 opened on:   7 Apr 2005, 11:11:10

. regress shipments managers workers materials newcap inventory

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  5,   449) = 5154.49
       Model |  9.3059e+16     5  1.8612e+16           Prob > F      =  0.0000
    Residual |  1.6212e+15   449  3.6108e+12           R-squared     =  0.9829
-------------+------------------------------           Adj R-squared =  0.9827
       Total |  9.4680e+16   454  2.0855e+14           Root MSE      =  1.9e+06

------------------------------------------------------------------------------
   shipments |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    managers |      96.23   6.141296    15.67   0.000     84.16075    108.2993
     workers |   16.70028   3.394212     4.92   0.000     10.02976    23.37079
   materials |   1.124667   .0148304    75.84   0.000     1.095521    1.153812
      newcap |   3.686418   .2701543    13.65   0.000     3.155494    4.217342
   inventory |   .3656406   .0682858     5.35   0.000     .2314412      .49984
       _cons |   258178.2   109967.8     2.35   0.019     42062.62    474293.7
------------------------------------------------------------------------------

. imtest

Cameron & Trivedi's decomposition of IM-test

---------------------------------------------------
              Source |       chi2     df      p
---------------------+-----------------------------
  Heteroskedasticity |     323.15     20    0.0000
            Skewness |-3819859.52      5    1.0000
            Kurtosis |          .      1         .
---------------------+-----------------------------
               Total |          .     26         .
---------------------------------------------------

. imtest, white

White's test for Ho: homoskedasticity
         against Ha: unrestricted heteroskedasticity

         chi2(20)     =    323.15
         Prob > chi2  =    0.0000

Cameron & Trivedi's decomposition of IM-test

---------------------------------------------------
              Source |       chi2     df      p
---------------------+-----------------------------
  Heteroskedasticity |     323.15     20    0.0000
            Skewness |-3819859.52      5    1.0000
            Kurtosis |          .      1         .
---------------------+-----------------------------
               Total |          .     26         .
---------------------------------------------------

. hettest materials

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity 
         Ho: Constant variance
         Variables: materials

         chi2(1)      =  2571.13
         Prob > chi2  =   0.0000

. predict res, resid

. generate res2=res*res

. generate materials2=materials*materials

. generate materialssqrt=sqrt(materials)

. regress res2 materials2

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  1,   453) =   91.46
       Model |  5.4176e+28     1  5.4176e+28           Prob > F      =  0.0000
    Residual |  2.6833e+29   453  5.9234e+26           R-squared     =  0.1680
-------------+------------------------------           Adj R-squared =  0.1661
       Total |  3.2250e+29   454  7.1036e+26           Root MSE      =  2.4e+13

------------------------------------------------------------------------------
        res2 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  materials2 |   .0096777   .0010119     9.56   0.000      .007689    .0116664
       _cons |   2.50e+12   1.15e+12     2.18   0.030     2.49e+11    4.76e+12
------------------------------------------------------------------------------

. twoway (scatter res materials)

. twoway (scatter res materialssqrt)

. twoway (scatter res workers)

. twoway (scatter res newcap)

. generate shipments1=shipments/materials

. generate managers1=managers/materials

. generate workers1=workers/materials

. generate a1=1/materials

. generate newcap1=newcap/materials

. generate inventory1=inventory/materials

. regress shipments1 managers1 workers1 a1 newcap1 inventory1

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  5,   449) =  186.78
       Model |  143.190256     5  28.6380512           Prob > F      =  0.0000
    Residual |  68.8414872   449  .153321798           R-squared     =  0.6753
-------------+------------------------------           Adj R-squared =  0.6717
       Total |  212.031743   454  .467030271           Root MSE      =  .39156

------------------------------------------------------------------------------
  shipments1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   managers1 |   92.22673   6.018158    15.32   0.000     80.39948     104.054
    workers1 |   12.47613   2.576051     4.84   0.000     7.413519    17.53875
          a1 |  -12654.42   7290.849    -1.74   0.083    -26982.85    1673.999
     newcap1 |   4.065195   .3698332    10.99   0.000     3.338376    4.792014
  inventory1 |   .7325114   .1215748     6.03   0.000     .4935852    .9714376
       _cons |   1.163453   .0449254    25.90   0.000     1.075163    1.251743
------------------------------------------------------------------------------

. hettest materials

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity 
         Ho: Constant variance
         Variables: materials

         chi2(1)      =     2.98
         Prob > chi2  =   0.0840

. imtest, white

White's test for Ho: homoskedasticity
         against Ha: unrestricted heteroskedasticity

         chi2(19)     =     63.42
         Prob > chi2  =    0.0000

Cameron & Trivedi's decomposition of IM-test

---------------------------------------------------
              Source |       chi2     df      p
---------------------+-----------------------------
  Heteroskedasticity |      63.42     19    0.0000
            Skewness |      21.42      5    0.0007
            Kurtosis |       3.96      1    0.0467
---------------------+-----------------------------
               Total |      88.80     25    0.0000
---------------------------------------------------

. generate res1, predict
options not allowed
r(101);

. predict res1, resid

. twoway (scatter res1 materials)

. twoway (scatter res1 a1)

. regress shipments managers workers materials newcap inventory [aweight=materials]
(sum of wgt is   1.7507e+09)

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  5,   449) =12612.71
       Model |  1.4718e+18     5  2.9436e+17           Prob > F      =  0.0000
    Residual |  1.0479e+16   449  2.3339e+13           R-squared     =  0.9929
-------------+------------------------------           Adj R-squared =  0.9929
       Total |  1.4823e+18   454  3.2650e+15           Root MSE      =  4.8e+06

------------------------------------------------------------------------------
   shipments |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    managers |    119.025   10.59523    11.23   0.000     98.20261    139.8474
     workers |   41.23643   3.773368    10.93   0.000     33.82077    48.65208
   materials |   1.216179   .0108623   111.96   0.000     1.194832    1.237527
      newcap |   1.038421   .2906638     3.57   0.000     .4671904    1.609651
   inventory |  -.0673875   .0765979    -0.88   0.379    -.2179223    .0831474
       _cons |   4667.451   330572.7     0.01   0.989    -644994.3    654329.2
------------------------------------------------------------------------------

. regress shipments managers workers materials newcap inventory [aweight=materialssqrt]
(sum of wgt is   7.1611e+05)

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  5,   449) = 8513.23
       Model |  4.4675e+17     5  8.9350e+16           Prob > F      =  0.0000
    Residual |  4.7124e+15   449  1.0495e+13           R-squared     =  0.9896
-------------+------------------------------           Adj R-squared =  0.9894
       Total |  4.5146e+17   454  9.9441e+14           Root MSE      =  3.2e+06

------------------------------------------------------------------------------
   shipments |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    managers |   104.1839   7.813839    13.33   0.000     88.82762    119.5401
     workers |   27.13721   3.564982     7.61   0.000     20.13109    34.14334
   materials |   1.163298   .0121215    95.97   0.000     1.139476     1.18712
      newcap |   2.630775   .2805061     9.38   0.000     2.079508    3.182043
   inventory |    .140807   .0693112     2.03   0.043     .0045923    .2770217
       _cons |   275130.2   194558.3     1.41   0.158    -107227.8    657488.1
------------------------------------------------------------------------------

. regress shipments managers workers materials newcap inventory a1 [aweight=materialssqrt]
(sum of wgt is   7.1611e+05)

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  6,   448) = 7083.76
       Model |  4.4675e+17     6  7.4459e+16           Prob > F      =  0.0000
    Residual |  4.7090e+15   448  1.0511e+13           R-squared     =  0.9896
-------------+------------------------------           Adj R-squared =  0.9894
       Total |  4.5146e+17   454  9.9441e+14           Root MSE      =  3.2e+06

------------------------------------------------------------------------------
   shipments |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    managers |   103.8923    7.83638    13.26   0.000     88.49169    119.2929
     workers |   26.99094   3.576858     7.55   0.000     19.96144    34.02044
   materials |    1.16312   .0121347    95.85   0.000     1.139272    1.186968
      newcap |   2.628454   .2807464     9.36   0.000      2.07671    3.180197
   inventory |   .1389386   .0694406     2.00   0.046     .0024689    .2754083
          a1 |  -6.97e+10   1.22e+11    -0.57   0.568    -3.10e+11    1.70e+11
       _cons |   335755.6   221798.8     1.51   0.131    -100139.6    771650.8
------------------------------------------------------------------------------

. regress shipments managers workers materials newcap inventory a1 [aweight=materials]
(sum of wgt is   1.7507e+09)

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  6,   448) =10487.29
       Model |  1.4718e+18     6  2.4530e+17           Prob > F      =  0.0000
    Residual |  1.0479e+16   448  2.3390e+13           R-squared     =  0.9929
-------------+------------------------------           Adj R-squared =  0.9928
       Total |  1.4823e+18   454  3.2650e+15           Root MSE      =  4.8e+06

------------------------------------------------------------------------------
   shipments |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    managers |   119.0928   10.65336    11.18   0.000     98.15603    140.0295
     workers |   41.24918   3.782174    10.91   0.000     33.81617    48.68218
   materials |    1.21622   .0108908   111.67   0.000     1.194817    1.237624
      newcap |   1.039362    .291313     3.57   0.000     .4668523    1.611872
   inventory |  -.0671319   .0767743    -0.87   0.382    -.2180143    .0837505
          a1 |   3.05e+10   4.47e+11     0.07   0.946    -8.48e+11    9.09e+11
       _cons |  -9450.205   390245.9    -0.02   0.981      -776390    757489.6
------------------------------------------------------------------------------

. regress shipments managers workers materials newcap inventory a1 [aweight=materials2]
(sum of wgt is   4.9878e+16)

      Source |       SS       df       MS              Number of obs =     455
-------------+------------------------------           F(  6,   448) =14929.74
       Model |  2.1428e+18     6  3.5714e+17           Prob > F      =  0.0000
    Residual |  1.0717e+16   448  2.3921e+13           R-squared     =  0.9950
-------------+------------------------------           Adj R-squared =  0.9950
       Total |  2.1535e+18   454  4.7435e+15           Root MSE      =  4.9e+06

------------------------------------------------------------------------------
   shipments |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    managers |   174.4245   17.76876     9.82   0.000     139.5041     209.345
     workers |   59.43217   4.124432    14.41   0.000     51.32653    67.53781
   materials |   1.307009   .0088762   147.25   0.000     1.289565    1.324453
      newcap |  -1.405297   .2672414    -5.26   0.000    -1.930499   -.8800946
   inventory |  -.3559808   .0963619    -3.69   0.000    -.5453583   -.1666033
          a1 |   6.28e+12   3.17e+12     1.98   0.048     5.40e+10    1.25e+13
       _cons |   -3041124   858591.8    -3.54   0.000     -4728492    -1353757
------------------------------------------------------------------------------

. use "T:\schmidt-stata\schoolspend.dta", clear

. regress totalspend totalstateaid income minority

      Source |       SS       df       MS              Number of obs =      50
-------------+------------------------------           F(  3,    46) =  213.91
       Model |  1.4757e+09     3   491908574           Prob > F      =  0.0000
    Residual |   105780023    46  2299565.72           R-squared     =  0.9331
-------------+------------------------------           Adj R-squared =  0.9288
       Total |  1.5815e+09    49  32275627.4           Root MSE      =  1516.4

------------------------------------------------------------------------------
  totalspend |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
totalstate~d |  -.2778458   .3049163    -0.91   0.367    -.8916104    .3359188
      income |   .0320546   .0045188     7.09   0.000     .0229587    .0411505
    minority |   -7.01137   19.05167    -0.37   0.715    -45.36038    31.33764
       _cons |   207.5894   392.4485     0.53   0.599    -582.3685    997.5472
------------------------------------------------------------------------------

. hettest population

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity 
         Ho: Constant variance
         Variables: population

         chi2(1)      =   140.36
         Prob > chi2  =   0.0000

. imtest, white

White's test for Ho: homoskedasticity
         against Ha: unrestricted heteroskedasticity

         chi2(9)      =     25.42
         Prob > chi2  =    0.0025

Cameron & Trivedi's decomposition of IM-test

---------------------------------------------------
              Source |       chi2     df      p
---------------------+-----------------------------
  Heteroskedasticity |      25.42      9    0.0025
            Skewness |       4.72      3    0.1934
            Kurtosis |       1.29      1    0.2568
---------------------+-----------------------------
               Total |      31.43     13    0.0029
---------------------------------------------------

. predict r, resid

. twoway (scatter r population)

. - preserve

. twoway (scatter r totalstateaid)

. log close
       log:  T:\schmidt-stata\manuf1.log
  log type:  text
 closed on:   7 Apr 2005, 11:48:50
------------------------------------------------------------------------------------------------------
