[Stata Program]

note: ATI example -- Pedhazur data p. 464
use http://www.gseis.ucla.edu/courses/data/ati

generate x4 = x1*x3
summarize y x3
regress y x3, beta
regress y x3 x1, beta
regress y x3 x1 x4, beta
plot y x3
plot y x3 if x1==1
plot y x3 if x1==0


[Stata Output]

generate x4 = x1*x3

summarize y x3

Variable |     Obs        Mean   Std. Dev.       Min        Max
---------+-----------------------------------------------------
       y |      40         4.2   1.897367          1          7  
      x3 |      40       31.25   17.52178          5         63  

regress y x3, beta

  Source |       SS       df       MS                  Number of obs =      40
---------+------------------------------               F(  1,    38) =    0.13
   Model |  .469787447     1  .469787447               Prob > F      =  0.7229
Residual |  139.930213    38  3.68237401               R-squared     =  0.0033
---------+------------------------------               Adj R-squared = -0.0229
   Total |      140.40    39        3.60               Root MSE      =   1.919

------------------------------------------------------------------------------
       y |      Coef.   Std. Err.       t     P>|t|                       Beta
---------+--------------------------------------------------------------------
      x3 |  -.0062638   .0175369     -0.357   0.723                  -.0578452
   _cons |   4.395745   .6264144      7.017   0.000                          .
------------------------------------------------------------------------------

regress y x3 x1, beta

  Source |       SS       df       MS                  Number of obs =      40
---------+------------------------------               F(  2,    37) =    0.30
   Model |  2.21859402     2  1.10929701               Prob > F      =  0.7448
Residual |  138.181406    37  3.73463259               R-squared     =  0.0158
---------+------------------------------               Adj R-squared = -0.0374
   Total |      140.40    39        3.60               Root MSE      =  1.9325

------------------------------------------------------------------------------
       y |      Coef.   Std. Err.       t     P>|t|                       Beta
---------+--------------------------------------------------------------------
      x3 |  -.0072097   .0177149     -0.407   0.686                  -.0665803
      x1 |   .4194662   .6129853      0.684   0.498                   .1119473
   _cons |   4.215571   .6835853      6.167   0.000                          .
------------------------------------------------------------------------------

regress y x3 x1 x4, beta

  Source |       SS       df       MS                  Number of obs =      40
---------+------------------------------               F(  3,    36) =  116.93
   Model |  127.332425     3  42.4441416               Prob > F      =  0.0000
Residual |  13.0675753    36  .362988203               R-squared     =  0.9069
---------+------------------------------               Adj R-squared =  0.8992
   Total |      140.40    39        3.60               Root MSE      =  .60249

------------------------------------------------------------------------------
       y |      Coef.   Std. Err.       t     P>|t|                       Beta
---------+--------------------------------------------------------------------
      x3 |  -.1067964    .007699    -13.871   0.000                  -.9862426
      x1 |  -5.999715   .3950574    -15.187   0.000                  -1.601206
      x4 |   .2051554   .0110504     18.565   0.000                   2.217581
   _cons |   7.193213   .2667243     26.969   0.000                          .
------------------------------------------------------------------------------

plot y x3

       7 +  
         | * * *                                                  *    *
         |  
    t    |  
    e    |  
    a    |         *   *                    *          * *  *            *
    c    |  
    h    |  
    e    |        *      *  **        *       *  * *
    r    |  
         |  
    r    |                    *   **
    a    |  
    t    |  
    i    |              *  *     *      *   *          *
    n    |  
    g    |  
    s    | *    *     *                          *       * *         *
         |  
         |  
       1 +   *                                                 *           *
          +----------------------------------------------------------------+
                5             tolerance of ambiguity                   63


plot y x3 if x1==1

       7 +  
         |                                                         *    *
         |  
    t    |  
    e    |  
    a    |                                  *          *  *  *             *
    c    |  
    h    |  
    e    |                             *      *   * *
    r    |  
         |  
    r    |                     *   *
    a    |  
    t    |  
    i    |              *  *     *
    n    |  
    g    |  
    s    | *    *     *
         |  
         |  
       1 +   *
          +----------------------------------------------------------------+
                5             tolerance of ambiguity                   62


plot y x3 if x1==0

       7 +  
         | * * *
         |  
    t    |  
    e    |  
    a    |         *   *
    c    |  
    h    |  
    e    |        *      *  **
    r    |  
         |  
    r    |                        **
    a    |  
    t    |  
    i    |                              *   *          *
    n    |  
    g    |  
    s    |                                       *       * *         *
         |  
         |  
       1 +                                                     *           *
          +----------------------------------------------------------------+
                5             tolerance of ambiguity                   63