-------------
       log:  C:\data\comprev.txt
  log type:  smcl
 opened on:   3 Sep 2008, 22:18:55

. clear

. insheet make price mpg rep78 headroom trunk weight length turn displacement gear_ratio foreign using cars.csv
(12 vars, 74 obs)

. desc

Contains data
  obs:            74
 vars:            12
 size:         3,626 (99.7% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
make            str17  %17s
price           int    %8.0g
mpg             byte   %8.0g
rep78           byte   %8.0g
headroom        float  %9.0g
trunk           byte   %8.0g
weight          int    %8.0g
length          int    %8.0g
turn            byte   %8.0g
displacement    int    %8.0g
gear_ratio      float  %9.0g
foreign         str8   %9s
-------------------------------------------------------------------------------
Sorted by:
     Note:  dataset has changed since last saved

. list

     +----------------------------------------------------------------------------------------------------------------------+
     |              make   price   mpg   rep78   headroom   trunk   weight   length   turn   displa~t   gear_r~o    foreign |
     +----------------------------------------------------------------------------------------------------------------------+
  1. | Linc. Continental   11497    12       3        3.5      22     4840      233     51        400       2.47   Domestic |
  2. |      Linc. Mark V   13594    12       3        2.5      18     4720      230     48        400       2.47   Domestic |
  3. |  Linc. Versailles   13466    14       3        3.5      15     3830      201     41        302       2.47   Domestic |
  4. |        Merc. XR-7    6303    14       4          3      16     4130      217     45        302       2.75   Domestic |
  5. |      Cad. Deville   11385    14       3          4      20     4330      221     44        425       2.28   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
  6. |       Peugeot 604   12990    14       .        3.5      14     3420      192     38        163       3.58    Foreign |
  7. |     Cad. Eldorado   14500    14       2        3.5      16     3900      204     43        350       2.19   Domestic |
  8. |      Merc. Cougar    5379    14       4        3.5      16     4060      221     48        302       2.75   Domestic |
  9. |     Buick Electra    7827    15       4          4      20     4080      222     43        350       2.41   Domestic |
 10. |     Merc. Marquis    6165    15       3        3.5      23     3720      212     44        302       2.26   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
 11. |     Olds Toronado   10371    16       3        3.5      17     4030      206     43        350       2.41   Domestic |
 12. |     Buick Riviera   10372    16       3        3.5      17     3880      207     43        231       2.93   Domestic |
 13. |      Dodge Magnum    5886    16       2          4      17     3600      206     46        318       2.47   Domestic |
 14. |      Chev. Impala    5705    16       4          4      20     3690      212     43        250       2.56   Domestic |
 15. |         Volvo 260   11995    17       5        2.5      14     3170      193     37        163       2.98    Foreign |
     +----------------------------------------------------------------------------------------------------------------------+
 16. |         Audi 5000    9690    17       5          3      15     2830      189     37        131        3.2    Foreign |
 17. |         AMC Pacer    4749    17       3          3      11     3350      173     40        258       2.53   Domestic |
 18. |   Dodge St. Regis    6342    17       2        4.5      21     3740      220     46        225       2.94   Domestic |
 19. |    Pont. Firebird    4934    18       1        1.5       7     3470      198     42        231       3.08   Domestic |
 20. |     Olds Delta 88    4890    18       4          4      20     3690      218     42        231       2.73   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
 21. |     Toyota Corona    5719    18       5          2      11     2670      175     36        134       3.05    Foreign |
 22. |    Dodge Diplomat    4010    18       2          4      17     3600      206     46        318       2.47   Domestic |
 23. |     Buick LeSabre    5788    18       3          4      21     3670      218     43        231       2.73   Domestic |
 24. |     Merc. Monarch    4516    18       3          3      15     3370      198     41        250       2.43   Domestic |
 25. |      Plym. Volare    4060    18       2          5      16     3330      201     44        225       3.23   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
 26. |    Pont. Catalina    5798    18       4          4      20     3700      214     42        231       2.73   Domestic |
 27. |     Toyota Celica    5899    18       5        2.5      14     2410      174     36        134       3.06    Foreign |
 28. |        Olds Omega    4181    19       3        4.5      14     3370      200     43        231       3.08   Domestic |
 29. |      Olds Cutlass    4733    19       3        4.5      16     3300      198     42        231       2.93   Domestic |
 30. |     Pont. Phoenix    4424    19       .        3.5      13     3420      203     43        231       3.08   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
 31. |        Chev. Nova    3955    19       3        3.5      13     3430      197     43        250       2.56   Domestic |
 32. |     Pont. Le Mans    4723    19       3        3.5      17     3200      199     40        231       2.93   Domestic |
 33. |  Pont. Grand Prix    5222    19       3          2      16     3210      201     45        231       2.93   Domestic |
 34. |     Buick Skylark    4082    19       3        3.5      13     3400      200     42        231       3.08   Domestic |
 35. |    Olds Cutl Supr    5172    19       3          2      16     3310      198     42        231       2.93   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
 36. |       Buick Regal    5189    20       3          2      16     3280      200     42        196       2.93   Domestic |
 37. |      Merc. Zephyr    3291    20       3        3.5      17     2830      195     43        140       3.08   Domestic |
 38. |     Buick Century    4816    20       3        4.5      16     3250      196     40        196       2.93   Domestic |
 39. |      Cad. Seville   15906    21       3          3      13     4290      204     45        350       2.24   Domestic |
 40. |       Fiat Strada    4296    21       3        2.5      16     2130      161     36        105       3.37    Foreign |
     +----------------------------------------------------------------------------------------------------------------------+
 41. |        Datsun 810    8129    21       4        2.5       8     2750      184     38        146       3.55    Foreign |
 42. |           Olds 98    8814    21       4          4      20     4060      220     43        350       2.41   Domestic |
 43. |      Ford Mustang    4187    21       3          2      10     2650      179     43        140       3.08   Domestic |
 44. |      Merc. Bobcat    3829    22       4          3       9     2580      169     39        140       2.73   Domestic |
 45. | Chev. Monte Carlo    5104    22       2          2      16     3220      200     41        200       2.73   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
 46. |       AMC Concord    4099    22       3        2.5      11     2930      186     40        121       3.58   Domestic |
 47. |      Chev. Malibu    4504    22       3        3.5      17     3180      193     31        200       2.73   Domestic |
 48. |        AMC Spirit    3799    22       .          3      12     2640      168     35        121       3.08   Domestic |
 49. |        Datsun 200    6229    23       4        1.5       6     2370      170     35        119       3.89    Foreign |
 50. |          Audi Fox    6295    23       3        2.5      11     2070      174     36         97        3.7    Foreign |
     +----------------------------------------------------------------------------------------------------------------------+
 51. |         VW Dasher    7140    23       4        2.5      12     2160      172     36         97       3.74    Foreign |
 52. |     Pont. Sunbird    4172    24       2          2       7     2690      179     41        151       2.73   Domestic |
 53. |       Chev. Monza    3667    24       2          2       7     2750      179     40        151       2.73   Domestic |
 54. |     Olds Starfire    4195    24       1          2      10     2730      180     40        151       2.73   Domestic |
 55. |        Datsun 510    5079    24       4        2.5       8     2280      170     34        119       3.54    Foreign |
     +----------------------------------------------------------------------------------------------------------------------+
 56. |      Honda Accord    5799    25       5          3      10     2240      172     36        107       3.05    Foreign |
 57. |          BMW 320i    9735    25       4        2.5      12     2650      177     34        121       3.64    Foreign |
 58. |       VW Scirocco    6850    25       4          2      16     1990      156     36         97       3.78    Foreign |
 59. |         VW Rabbit    4697    25       4          3      15     1930      155     35         89       3.78    Foreign |
 60. |     Plym. Horizon    4482    25       3          4      17     2200      165     36        105       3.37   Domestic |
     +----------------------------------------------------------------------------------------------------------------------+
 61. |        Buick Opel    4453    26       .          3      10     2230      170     34        304       2.87   Domestic |
 62. |     Plym. Sapporo    6486    26       .        1.5       8     2520      182     38        119       3.54   Domestic |
 63. |    Renault Le Car    3895    26       3          3      10     1830      142     34         79       3.72    Foreign |
 64. |       Plym. Arrow    4647    28       3          2      11     3260      170     37        156       3.05   Domestic |
 65. |       Honda Civic    4499    28       4        2.5       5     1760      149     34         91        3.3    Foreign |
     +----------------------------------------------------------------------------------------------------------------------+
 66. |       Ford Fiesta    4389    28       4        1.5       9     1800      147     33         98       3.15   Domestic |
 67. |    Chev. Chevette    3299    29       3        2.5       9     2110      163     34        231       2.93   Domestic |
 68. |        Dodge Colt    3984    30       5          2       8     2120      163     35         98       3.54   Domestic |
 69. |         Mazda GLC    3995    30       4        3.5      11     1980      154     33         86       3.73    Foreign |
 70. |    Toyota Corolla    3748    31       5          3       9     2200      165     35         97       3.21    Foreign |
     +----------------------------------------------------------------------------------------------------------------------+
 71. |       Plym. Champ    4425    34       5        2.5      11     1800      157     37         86       2.97   Domestic |
 72. |            Subaru    3798    35       5        2.5      11     2050      164     36         97       3.81    Foreign |
 73. |        Datsun 210    4589    35       5          2       8     2020      165     32         85        3.7    Foreign |
 74. |         VW Diesel    5397    41       5          3      15     2040      155     35         90       3.78    Foreign |
     +----------------------------------------------------------------------------------------------------------------------+

. codebook

-------------
make(unlabeled)
-------------

                  type:  string (str17)

         unique values:  74                       missing "":  0/74

              examples:  "Cad. Deville"
                         "Dodge Magnum"
                         "Merc. XR-7"
                         "Pont. Catalina"

               warning:  variable has embedded blanks

-------------
price(unlabeled)
-------------

                  type:  numeric (int)

                 range:  [3291,15906]                 units:  1
         unique values:  74                       missing .:  0/74

                  mean:   6165.26
              std. dev:    2949.5

           percentiles:        10%       25%       50%       75%       90%
                              3895      4195    5006.5      6342     11385

-------------
mpg(unlabeled)
-------------

                  type:  numeric (byte)

                 range:  [12,41]                      units:  1
         unique values:  21                       missing .:  0/74

                  mean:   21.2973
              std. dev:    5.7855

           percentiles:        10%       25%       50%       75%       90%
                                14        18        20        25        29

-------------
rep78(unlabeled)
-------------

                  type:  numeric (byte)

                 range:  [1,5]                        units:  1
         unique values:  5                        missing .:  5/74

            tabulation:  Freq.  Value
                             2  1
                             8  2
                            30  3
                            18  4
                            11  5
                             5  .

-------------
headroom(unlabeled)
-------------

                  type:  numeric (float)

                 range:  [1.5,5]                      units:  .1
         unique values:  8                        missing .:  0/74

            tabulation:  Freq.  Value
                             4  1.5
                            13  2
                            14  2.5
                            13  3
                            15  3.5
                            10  4
                             4  4.5
                             1  5

-------------
trunk(unlabeled)
-------------

                  type:  numeric (byte)

                 range:  [5,23]                       units:  1
         unique values:  18                       missing .:  0/74

                  mean:   13.7568
              std. dev:    4.2774

           percentiles:        10%       25%       50%       75%       90%
                                 8        10        14        17        20

-------------
weight(unlabeled)
-------------

                  type:  numeric (int)

                 range:  [1760,4840]                  units:  10
         unique values:  64                       missing .:  0/74

                  mean:   3019.46
              std. dev:   777.194

           percentiles:        10%       25%       50%       75%       90%
                              2020      2240      3190      3600      4060

-------------
length(unlabeled)
-------------

                  type:  numeric (int)

                 range:  [142,233]                    units:  1
         unique values:  47                       missing .:  0/74

                  mean:   187.932
              std. dev:   22.2663

           percentiles:        10%       25%       50%       75%       90%
                               157       170     192.5       204       218

-------------
turn(unlabeled)
-------------

                  type:  numeric (byte)

                 range:  [31,51]                      units:  1
         unique values:  18                       missing .:  0/74

                  mean:   39.6486
              std. dev:   4.39935

           percentiles:        10%       25%       50%       75%       90%
                                34        36        40        43        45

-------------
displacement(unlabeled)
-------------

                  type:  numeric (int)

                 range:  [79,425]                     units:  1
         unique values:  31                       missing .:  0/74

                  mean:   197.297
              std. dev:   91.8372

           percentiles:        10%       25%       50%       75%       90%
                                97       119       196       250       350

-------------
gear_ratio(unlabeled)
-------------

                  type:  numeric (float)

                 range:  [2.19,3.89]                  units:  .01
         unique values:  36                       missing .:  0/74

                  mean:   3.01486
              std. dev:   .456287

           percentiles:        10%       25%       50%       75%       90%
                              2.43      2.73     2.955      3.37      3.72

-------------
foreign(unlabeled)
-------------

                  type:  string (str8)

         unique values:  2                        missing "":  0/74

            tabulation:  Freq.  Value
                            52  "Domestic"
                            22  "Foreign"

. count
   74

. edit
- preserve

. summarize

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        make |         0
       price |        74    6165.257    2949.496       3291      15906
         mpg |        74     21.2973    5.785503         12         41
       rep78 |        69    3.405797    .9899323          1          5
    headroom |        74    2.993243    .8459948        1.5          5
-------------+--------------------------------------------------------
       trunk |        74    13.75676    4.277404          5         23
      weight |        74    3019.459    777.1936       1760       4840
      length |        74    187.9324    22.26634        142        233
        turn |        74    39.64865    4.399354         31         51
displacement |        74    197.2973    91.83722         79        425
-------------+--------------------------------------------------------
  gear_ratio |        74    3.014865    .4562871       2.19       3.89
     foreign |         0

. inspect make

make:                                          Number of Observations
-------                                                            Non-
                                               Total   Integers    Integers
|                               Negative           -         -          -
|                               Zero               -         -          -
|                               Positive           -         -          -
|                                              -----     -----      -----
|                               Total              -         -          -
|                               Missing           74
+----------------------                        -----
.             -9.0e+307                           74
   (0 unique value)

. inspect price

price:                                         Number of Observations
--------                                                           Non-
                                               Total   Integers    Integers
|  #                            Negative           -         -          -
|  #                            Zero               -         -          -
|  #                            Positive          74        74          -
|  #                                           -----     -----      -----
|  #                            Total             74        74          -
|  #   #   .   .   .            Missing            -
+----------------------                        -----
3291              15906                           74
  (74 unique values)


. pwcorr make price
(make ignored because string variable)
too few variables specified
r(102);

. correlate price mpg
(obs=74)

             |    price      mpg
-------------+------------------
       price |   1.0000
         mpg |  -0.4686   1.0000


. correlate price mpg rep78
(obs=69)

             |    price      mpg    rep78
-------------+---------------------------
       price |   1.0000
         mpg |  -0.4559   1.0000
       rep78 |   0.0066   0.4023   1.0000


. pwcorr price mpg

             |    price      mpg
-------------+------------------
       price |   1.0000
         mpg |  -0.4686   1.0000

. pwcorr price trunk

             |    price    trunk
-------------+------------------
       price |   1.0000
       trunk |   0.3143   1.0000

. ttest mpg = 30

One-sample t test
---------+--------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
     mpg |      74     21.2973    .6725511    5.785503     19.9569    22.63769
---------+--------------------------------------------------------------------
    mean = mean(mpg)                                              t = -12.9398
Ho: mean = 30                                    degrees of freedom =       73

    Ha: mean < 30               Ha: mean != 30                 Ha: mean > 30
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

. ttest mpg = 22

One-sample t test
---------+--------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
     mpg |      74     21.2973    .6725511    5.785503     19.9569    22.63769
---------+--------------------------------------------------------------------
    mean = mean(mpg)                                              t =  -1.0448
Ho: mean = 22                                    degrees of freedom =       73

    Ha: mean < 22               Ha: mean != 22                 Ha: mean > 22
 Pr(T < t) = 0.1498         Pr(|T| > |t|) = 0.2995          Pr(T > t) = 0.8502

. ttest trunk=length

Paired t test
---------+--------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
   trunk |      74    13.75676    .4972381    4.277404    12.76576    14.74775
  length |      74    187.9324    2.588409    22.26634    182.7737    193.0911
---------+--------------------------------------------------------------------
    diff |      74   -174.1757    2.253169    19.38249   -178.6662   -169.6851
---------+--------------------------------------------------------------------
     mean(diff) = mean(trunk - length)                            t = -77.3025
 Ho: mean(diff) = 0                              degrees of freedom =       73

 Ha: mean(diff) < 0           Ha: mean(diff) != 0           Ha: mean(diff) > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

. table price

----------+-----------
    price |      Freq.
----------+-----------
     3291 |          1
     3299 |          1
     3667 |          1
     3748 |          1
     3798 |          1
     3799 |          1
     3829 |          1
     3895 |          1
     3955 |          1
     3984 |          1
     3995 |          1
     4010 |          1
     4060 |          1
     4082 |          1
     4099 |          1
     4172 |          1
     4181 |          1
     4187 |          1
     4195 |          1
     4296 |          1
     4389 |          1
     4424 |          1
     4425 |          1
     4453 |          1
     4482 |          1
     4499 |          1
     4504 |          1
     4516 |          1
     4589 |          1
     4647 |          1
     4697 |          1
     4723 |          1
     4733 |          1
     4749 |          1
     4816 |          1
     4890 |          1
     4934 |          1
     5079 |          1
     5104 |          1
     5172 |          1
     5189 |          1
     5222 |          1
     5379 |          1
     5397 |          1
     5705 |          1
     5719 |          1
     5788 |          1
     5798 |          1
     5799 |          1
     5886 |          1
     5899 |          1
     6165 |          1
     6229 |          1
     6295 |          1
     6303 |          1
     6342 |          1
     6486 |          1
     6850 |          1
     7140 |          1
     7827 |          1
     8129 |          1
     8814 |          1
     9690 |          1
     9735 |          1
    10371 |          1
    10372 |          1
    11385 |          1
    11497 |          1
    11995 |          1
    12990 |          1
    13466 |          1
    13594 |          1
    14500 |          1
    15906 |          1
----------+-----------

.  table price mpg rep78

----------+-----------------------------------------------------------------------------------------------------------------------------
          |                                                        rep78 and mpg
          | ------------------------------------------------------------- 1 ------------------------------------------------------------
    price |   12    14    15    16    17    18    19    20    21    22    23    24    25    26    28    29    30    31    34    35    41
----------+-----------------------------------------------------------------------------------------------------------------------------
     3291 |
     3299 |
     3667 |
     3748 |
     3798 |
     3829 |
     3895 |
     3955 |
     3984 |
     3995 |
     4010 |
     4060 |
     4082 |
     4099 |
     4172 |
     4181 |
     4187 |
     4195 |                                                                      1
     4296 |
     4389 |
     4425 |
     4482 |
     4499 |
     4504 |
     4516 |
     4589 |
     4647 |
     4697 |
     4723 |
     4733 |
     4749 |
     4816 |
     4890 |
     4934 |                                  1
     5079 |
     5104 |
     5172 |
     5189 |
     5222 |
     5379 |
     5397 |
     5705 |
     5719 |
     5788 |
     5798 |
     5799 |
     5886 |
     5899 |
     6165 |
     6229 |
     6295 |
     6303 |
     6342 |
     6850 |
     7140 |
     7827 |
     8129 |
     8814 |
     9690 |
     9735 |
    10371 |
    10372 |
    11385 |
    11497 |
    11995 |
    13466 |
    13594 |
    14500 |
    15906 |
----------+-----------------------------------------------------------------------------------------------------------------------------

----------+-----------------------------------------------------------------------------------------------------------------------------
          |                                                        rep78 and mpg
          | ------------------------------------------------------------- 2 ------------------------------------------------------------
    price |   12    14    15    16    17    18    19    20    21    22    23    24    25    26    28    29    30    31    34    35    41
----------+-----------------------------------------------------------------------------------------------------------------------------
     3291 |
     3299 |
     3667 |                                                                      1
     3748 |
     3798 |
     3829 |
     3895 |
     3955 |
     3984 |
     3995 |
     4010 |                                  1
     4060 |                                  1
     4082 |
     4099 |
     4172 |                                                                      1
     4181 |
     4187 |
     4195 |
     4296 |
     4389 |
     4425 |
     4482 |
     4499 |
     4504 |
     4516 |
     4589 |
     4647 |
     4697 |
     4723 |
     4733 |
     4749 |
     4816 |
     4890 |
     4934 |
     5079 |
     5104 |                                                          1
     5172 |
     5189 |
     5222 |
     5379 |
     5397 |
     5705 |
     5719 |
     5788 |
     5798 |
     5799 |
     5886 |                      1
     5899 |
     6165 |
     6229 |
     6295 |
     6303 |
     6342 |                            1
     6850 |
     7140 |
     7827 |
     8129 |
     8814 |
     9690 |
     9735 |
    10371 |
    10372 |
    11385 |
    11497 |
    11995 |
    13466 |
    13594 |
    14500 |          1
    15906 |
----------+-----------------------------------------------------------------------------------------------------------------------------

----------+-----------------------------------------------------------------------------------------------------------------------------
          |                                                        rep78 and mpg
          | ------------------------------------------------------------- 3 ------------------------------------------------------------
    price |   12    14    15    16    17    18    19    20    21    22    23    24    25    26    28    29    30    31    34    35    41
----------+-----------------------------------------------------------------------------------------------------------------------------
     3291 |                                              1
     3299 |                                                                                              1
     3667 |
     3748 |
     3798 |
     3829 |
     3895 |                                                                                  1
     3955 |                                        1
     3984 |
     3995 |
     4010 |
     4060 |
     4082 |                                        1
     4099 |                                                          1
     4172 |
     4181 |                                        1
     4187 |                                                    1
     4195 |
     4296 |                                                    1
     4389 |
     4425 |
     4482 |                                                                            1
     4499 |
     4504 |                                                          1
     4516 |                                  1
     4589 |
     4647 |                                                                                        1
     4697 |
     4723 |                                        1
     4733 |                                        1
     4749 |                            1
     4816 |                                              1
     4890 |
     4934 |
     5079 |
     5104 |
     5172 |                                        1
     5189 |                                              1
     5222 |                                        1
     5379 |
     5397 |
     5705 |
     5719 |
     5788 |                                  1
     5798 |
     5799 |
     5886 |
     5899 |
     6165 |                1
     6229 |
     6295 |                                                                1
     6303 |
     6342 |
     6850 |
     7140 |
     7827 |
     8129 |
     8814 |
     9690 |
     9735 |
    10371 |                      1
    10372 |                      1
    11385 |          1
    11497 |    1
    11995 |
    13466 |          1
    13594 |    1
    14500 |
    15906 |                                                    1
----------+-----------------------------------------------------------------------------------------------------------------------------

----------+-----------------------------------------------------------------------------------------------------------------------------
          |                                                        rep78 and mpg
          | ------------------------------------------------------------- 4 ------------------------------------------------------------
    price |   12    14    15    16    17    18    19    20    21    22    23    24    25    26    28    29    30    31    34    35    41
----------+-----------------------------------------------------------------------------------------------------------------------------
     3291 |
     3299 |
     3667 |
     3748 |
     3798 |
     3829 |                                                          1
     3895 |
     3955 |
     3984 |
     3995 |                                                                                                    1
     4010 |
     4060 |
     4082 |
     4099 |
     4172 |
     4181 |
     4187 |
     4195 |
     4296 |
     4389 |                                                                                        1
     4425 |
     4482 |
     4499 |                                                                                        1
     4504 |
     4516 |
     4589 |
     4647 |
     4697 |                                                                            1
     4723 |
     4733 |
     4749 |
     4816 |
     4890 |                                  1
     4934 |
     5079 |                                                                      1
     5104 |
     5172 |
     5189 |
     5222 |
     5379 |          1
     5397 |
     5705 |                      1
     5719 |
     5788 |
     5798 |                                  1
     5799 |
     5886 |
     5899 |
     6165 |
     6229 |                                                                1
     6295 |
     6303 |          1
     6342 |
     6850 |                                                                            1
     7140 |                                                                1
     7827 |                1
     8129 |                                                    1
     8814 |                                                    1
     9690 |
     9735 |                                                                            1
    10371 |
    10372 |
    11385 |
    11497 |
    11995 |
    13466 |
    13594 |
    14500 |
    15906 |
----------+-----------------------------------------------------------------------------------------------------------------------------

----------+-----------------------------------------------------------------------------------------------------------------------------
          |                                                        rep78 and mpg
          | ------------------------------------------------------------- 5 ------------------------------------------------------------
    price |   12    14    15    16    17    18    19    20    21    22    23    24    25    26    28    29    30    31    34    35    41
----------+-----------------------------------------------------------------------------------------------------------------------------
     3291 |
     3299 |
     3667 |
     3748 |                                                                                                          1
     3798 |                                                                                                                      1
     3829 |
     3895 |
     3955 |
     3984 |                                                                                                    1
     3995 |
     4010 |
     4060 |
     4082 |
     4099 |
     4172 |
     4181 |
     4187 |
     4195 |
     4296 |
     4389 |
     4425 |                                                                                                                1
     4482 |
     4499 |
     4504 |
     4516 |
     4589 |                                                                                                                      1
     4647 |
     4697 |
     4723 |
     4733 |
     4749 |
     4816 |
     4890 |
     4934 |
     5079 |
     5104 |
     5172 |
     5189 |
     5222 |
     5379 |
     5397 |                                                                                                                            1
     5705 |
     5719 |                                  1
     5788 |
     5798 |
     5799 |                                                                            1
     5886 |
     5899 |                                  1
     6165 |
     6229 |
     6295 |
     6303 |
     6342 |
     6850 |
     7140 |
     7827 |
     8129 |
     8814 |
     9690 |                            1
     9735 |
    10371 |
    10372 |
    11385 |
    11497 |
    11995 |                            1
    13466 |
    13594 |
    14500 |
    15906 |
----------+-----------------------------------------------------------------------------------------------------------------------------

.  table price mpg

----------+-----------------------------------------------------------------------------------------------------------------------------
          |                                                             mpg
    price |   12    14    15    16    17    18    19    20    21    22    23    24    25    26    28    29    30    31    34    35    41
----------+-----------------------------------------------------------------------------------------------------------------------------
     3291 |                                              1
     3299 |                                                                                              1
     3667 |                                                                      1
     3748 |                                                                                                          1
     3798 |                                                                                                                      1
     3799 |                                                          1
     3829 |                                                          1
     3895 |                                                                                  1
     3955 |                                        1
     3984 |                                                                                                    1
     3995 |                                                                                                    1
     4010 |                                  1
     4060 |                                  1
     4082 |                                        1
     4099 |                                                          1
     4172 |                                                                      1
     4181 |                                        1
     4187 |                                                    1
     4195 |                                                                      1
     4296 |                                                    1
     4389 |                                                                                        1
     4424 |                                        1
     4425 |                                                                                                                1
     4453 |                                                                                  1
     4482 |                                                                            1
     4499 |                                                                                        1
     4504 |                                                          1
     4516 |                                  1
     4589 |                                                                                                                      1
     4647 |                                                                                        1
     4697 |                                                                            1
     4723 |                                        1
     4733 |                                        1
     4749 |                            1
     4816 |                                              1
     4890 |                                  1
     4934 |                                  1
     5079 |                                                                      1
     5104 |                                                          1
     5172 |                                        1
     5189 |                                              1
     5222 |                                        1
     5379 |          1
     5397 |                                                                                                                            1
     5705 |                      1
     5719 |                                  1
     5788 |                                  1
     5798 |                                  1
     5799 |                                                                            1
     5886 |                      1
     5899 |                                  1
     6165 |                1
     6229 |                                                                1
     6295 |                                                                1
     6303 |          1
     6342 |                            1
     6486 |                                                                                  1
     6850 |                                                                            1
     7140 |                                                                1
     7827 |                1
     8129 |                                                    1
     8814 |                                                    1
     9690 |                            1
     9735 |                                                                            1
    10371 |                      1
    10372 |                      1
    11385 |          1
    11497 |    1
    11995 |                            1
    12990 |          1
    13466 |          1
    13594 |    1
    14500 |          1
    15906 |                                                    1
----------+-----------------------------------------------------------------------------------------------------------------------------

. tabulate price, summarize(mpg)

            |           Summary of mpg
      price |        Mean   Std. Dev.       Freq.
------------+------------------------------------
       3291 |          20           0           1
       3299 |          29           0           1
       3667 |          24           0           1
       3748 |          31           0           1
       3798 |          35           0           1
       3799 |          22           0           1
       3829 |          22           0           1
       3895 |          26           0           1
       3955 |          19           0           1
       3984 |          30           0           1
       3995 |          30           0           1
       4010 |          18           0           1
       4060 |          18           0           1
       4082 |          19           0           1
       4099 |          22           0           1
       4172 |          24           0           1
       4181 |          19           0           1
       4187 |          21           0           1
       4195 |          24           0           1
       4296 |          21           0           1
       4389 |          28           0           1
       4424 |          19           0           1
       4425 |          34           0           1
       4453 |          26           0           1
       4482 |          25           0           1
       4499 |          28           0           1
       4504 |          22           0           1
       4516 |          18           0           1
       4589 |          35           0           1
       4647 |          28           0           1
       4697 |          25           0           1
       4723 |          19           0           1
       4733 |          19           0           1
       4749 |          17           0           1
       4816 |          20           0           1
       4890 |          18           0           1
       4934 |          18           0           1
       5079 |          24           0           1
       5104 |          22           0           1
       5172 |          19           0           1
       5189 |          20           0           1
       5222 |          19           0           1
       5379 |          14           0           1
       5397 |          41           0           1
       5705 |          16           0           1
       5719 |          18           0           1
       5788 |          18           0           1
       5798 |          18           0           1
       5799 |          25           0           1
       5886 |          16           0           1
       5899 |          18           0           1
       6165 |          15           0           1
       6229 |          23           0           1
       6295 |          23           0           1
       6303 |          14           0           1
       6342 |          17           0           1
       6486 |          26           0           1
       6850 |          25           0           1
       7140 |          23           0           1
       7827 |          15           0           1
       8129 |          21           0           1
       8814 |          21           0           1
       9690 |          17           0           1
       9735 |          25           0           1
      10371 |          16           0           1
      10372 |          16           0           1
      11385 |          14           0           1
      11497 |          12           0           1
      11995 |          17           0           1
      12990 |          14           0           1
      13466 |          14           0           1
      13594 |          12           0           1
      14500 |          14           0           1
      15906 |          21           0           1
------------+------------------------------------
      Total |   21.297297   5.7855032          74

. hist price
(bin=8, start=3291, width=1576.875)

. hist mpg
(bin=8, start=12, width=3.625)

. hist mpg
(bin=8, start=12, width=3.625)

. scatter price mpg

. scatter mpg price

. twoway line price mpg

. twoway line price length

. scatter mpg weight, msymbol(Oh) || lfit mpg weight, saving(mygraph)
(file mygraph.gph saved)

. scatter mpg weight, price
option price not allowed
invalid syntax
r(198);

. scatter mpg weight price

. gen 10perpice = price *0.1
10perpice invalid name
r(198);

. gen tenperprice = price *0.1

. list

     +---------------------------------------------------------------------------------------------------------------------------------+
     |              make   price   mpg   rep78   headroom   trunk   weight   length   turn   displa~t   gear_r~o    foreign   tenper~e |
     +---------------------------------------------------------------------------------------------------------------------------------+
  1. | Linc. Continental   11497    12       3        3.5      22     4840      233     51        400       2.47   Domestic     1149.7 |
  2. |      Linc. Mark V   13594    12       3        2.5      18     4720      230     48        400       2.47   Domestic     1359.4 |
  3. |  Linc. Versailles   13466    14       3        3.5      15     3830      201     41        302       2.47   Domestic     1346.6 |
  4. |        Merc. XR-7    6303    14       4          3      16     4130      217     45        302       2.75   Domestic      630.3 |
  5. |      Cad. Deville   11385    14       3          4      20     4330      221     44        425       2.28   Domestic     1138.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
  6. |       Peugeot 604   12990    14       .        3.5      14     3420      192     38        163       3.58    Foreign       1299 |
  7. |     Cad. Eldorado   14500    14       2        3.5      16     3900      204     43        350       2.19   Domestic       1450 |
  8. |      Merc. Cougar    5379    14       4        3.5      16     4060      221     48        302       2.75   Domestic      537.9 |
  9. |     Buick Electra    7827    15       4          4      20     4080      222     43        350       2.41   Domestic      782.7 |
 10. |     Merc. Marquis    6165    15       3        3.5      23     3720      212     44        302       2.26   Domestic      616.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 11. |     Olds Toronado   10371    16       3        3.5      17     4030      206     43        350       2.41   Domestic     1037.1 |
 12. |     Buick Riviera   10372    16       3        3.5      17     3880      207     43        231       2.93   Domestic     1037.2 |
 13. |      Dodge Magnum    5886    16       2          4      17     3600      206     46        318       2.47   Domestic      588.6 |
 14. |      Chev. Impala    5705    16       4          4      20     3690      212     43        250       2.56   Domestic      570.5 |
 15. |         Volvo 260   11995    17       5        2.5      14     3170      193     37        163       2.98    Foreign     1199.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 16. |         Audi 5000    9690    17       5          3      15     2830      189     37        131        3.2    Foreign        969 |
 17. |         AMC Pacer    4749    17       3          3      11     3350      173     40        258       2.53   Domestic      474.9 |
 18. |   Dodge St. Regis    6342    17       2        4.5      21     3740      220     46        225       2.94   Domestic      634.2 |
 19. |    Pont. Firebird    4934    18       1        1.5       7     3470      198     42        231       3.08   Domestic      493.4 |
 20. |     Olds Delta 88    4890    18       4          4      20     3690      218     42        231       2.73   Domestic        489 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 21. |     Toyota Corona    5719    18       5          2      11     2670      175     36        134       3.05    Foreign      571.9 |
 22. |    Dodge Diplomat    4010    18       2          4      17     3600      206     46        318       2.47   Domestic        401 |
 23. |     Buick LeSabre    5788    18       3          4      21     3670      218     43        231       2.73   Domestic      578.8 |
 24. |     Merc. Monarch    4516    18       3          3      15     3370      198     41        250       2.43   Domestic      451.6 |
 25. |      Plym. Volare    4060    18       2          5      16     3330      201     44        225       3.23   Domestic        406 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 26. |    Pont. Catalina    5798    18       4          4      20     3700      214     42        231       2.73   Domestic      579.8 |
 27. |     Toyota Celica    5899    18       5        2.5      14     2410      174     36        134       3.06    Foreign      589.9 |
 28. |        Olds Omega    4181    19       3        4.5      14     3370      200     43        231       3.08   Domestic      418.1 |
 29. |      Olds Cutlass    4733    19       3        4.5      16     3300      198     42        231       2.93   Domestic      473.3 |
 30. |     Pont. Phoenix    4424    19       .        3.5      13     3420      203     43        231       3.08   Domestic      442.4 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 31. |        Chev. Nova    3955    19       3        3.5      13     3430      197     43        250       2.56   Domestic      395.5 |
 32. |     Pont. Le Mans    4723    19       3        3.5      17     3200      199     40        231       2.93   Domestic      472.3 |
 33. |  Pont. Grand Prix    5222    19       3          2      16     3210      201     45        231       2.93   Domestic      522.2 |
 34. |     Buick Skylark    4082    19       3        3.5      13     3400      200     42        231       3.08   Domestic      408.2 |
 35. |    Olds Cutl Supr    5172    19       3          2      16     3310      198     42        231       2.93   Domestic      517.2 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 36. |       Buick Regal    5189    20       3          2      16     3280      200     42        196       2.93   Domestic      518.9 |
 37. |      Merc. Zephyr    3291    20       3        3.5      17     2830      195     43        140       3.08   Domestic      329.1 |
 38. |     Buick Century    4816    20       3        4.5      16     3250      196     40        196       2.93   Domestic      481.6 |
 39. |      Cad. Seville   15906    21       3          3      13     4290      204     45        350       2.24   Domestic     1590.6 |
 40. |       Fiat Strada    4296    21       3        2.5      16     2130      161     36        105       3.37    Foreign      429.6 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 41. |        Datsun 810    8129    21       4        2.5       8     2750      184     38        146       3.55    Foreign      812.9 |
 42. |           Olds 98    8814    21       4          4      20     4060      220     43        350       2.41   Domestic      881.4 |
 43. |      Ford Mustang    4187    21       3          2      10     2650      179     43        140       3.08   Domestic      418.7 |
 44. |      Merc. Bobcat    3829    22       4          3       9     2580      169     39        140       2.73   Domestic      382.9 |
 45. | Chev. Monte Carlo    5104    22       2          2      16     3220      200     41        200       2.73   Domestic      510.4 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 46. |       AMC Concord    4099    22       3        2.5      11     2930      186     40        121       3.58   Domestic      409.9 |
 47. |      Chev. Malibu    4504    22       3        3.5      17     3180      193     31        200       2.73   Domestic      450.4 |
 48. |        AMC Spirit    3799    22       .          3      12     2640      168     35        121       3.08   Domestic      379.9 |
 49. |        Datsun 200    6229    23       4        1.5       6     2370      170     35        119       3.89    Foreign      622.9 |
 50. |          Audi Fox    6295    23       3        2.5      11     2070      174     36         97        3.7    Foreign      629.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 51. |         VW Dasher    7140    23       4        2.5      12     2160      172     36         97       3.74    Foreign        714 |
 52. |     Pont. Sunbird    4172    24       2          2       7     2690      179     41        151       2.73   Domestic      417.2 |
 53. |       Chev. Monza    3667    24       2          2       7     2750      179     40        151       2.73   Domestic      366.7 |
 54. |     Olds Starfire    4195    24       1          2      10     2730      180     40        151       2.73   Domestic      419.5 |
 55. |        Datsun 510    5079    24       4        2.5       8     2280      170     34        119       3.54    Foreign      507.9 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 56. |      Honda Accord    5799    25       5          3      10     2240      172     36        107       3.05    Foreign      579.9 |
 57. |          BMW 320i    9735    25       4        2.5      12     2650      177     34        121       3.64    Foreign      973.5 |
 58. |       VW Scirocco    6850    25       4          2      16     1990      156     36         97       3.78    Foreign        685 |
 59. |         VW Rabbit    4697    25       4          3      15     1930      155     35         89       3.78    Foreign      469.7 |
 60. |     Plym. Horizon    4482    25       3          4      17     2200      165     36        105       3.37   Domestic      448.2 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 61. |        Buick Opel    4453    26       .          3      10     2230      170     34        304       2.87   Domestic      445.3 |
 62. |     Plym. Sapporo    6486    26       .        1.5       8     2520      182     38        119       3.54   Domestic      648.6 |
 63. |    Renault Le Car    3895    26       3          3      10     1830      142     34         79       3.72    Foreign      389.5 |
 64. |       Plym. Arrow    4647    28       3          2      11     3260      170     37        156       3.05   Domestic      464.7 |
 65. |       Honda Civic    4499    28       4        2.5       5     1760      149     34         91        3.3    Foreign      449.9 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 66. |       Ford Fiesta    4389    28       4        1.5       9     1800      147     33         98       3.15   Domestic      438.9 |
 67. |    Chev. Chevette    3299    29       3        2.5       9     2110      163     34        231       2.93   Domestic      329.9 |
 68. |        Dodge Colt    3984    30       5          2       8     2120      163     35         98       3.54   Domestic      398.4 |
 69. |         Mazda GLC    3995    30       4        3.5      11     1980      154     33         86       3.73    Foreign      399.5 |
 70. |    Toyota Corolla    3748    31       5          3       9     2200      165     35         97       3.21    Foreign      374.8 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 71. |       Plym. Champ    4425    34       5        2.5      11     1800      157     37         86       2.97   Domestic      442.5 |
 72. |            Subaru    3798    35       5        2.5      11     2050      164     36         97       3.81    Foreign      379.8 |
 73. |        Datsun 210    4589    35       5          2       8     2020      165     32         85        3.7    Foreign      458.9 |
 74. |         VW Diesel    5397    41       5          3      15     2040      155     35         90       3.78    Foreign      539.7 |
     +---------------------------------------------------------------------------------------------------------------------------------+

. label var tenperprice ``10 percent price''

. desc

Contains data
  obs:            74
 vars:            13
 size:         3,922 (99.6% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
make            str17  %17s
price           int    %8.0g
mpg             byte   %8.0g
rep78           byte   %8.0g
headroom        float  %9.0g
trunk           byte   %8.0g
weight          int    %8.0g
length          int    %8.0g
turn            byte   %8.0g
displacement    int    %8.0g
gear_ratio      float  %9.0g
foreign         str8   %9s
tenperprice      float  %9.0g
-------------------------------------------------------------------------------
Sorted by:
     Note:  dataset has changed since last saved

. summarize

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        make |         0
       price |        74    6165.257    2949.496       3291      15906
         mpg |        74     21.2973    5.785503         12         41
       rep78 |        69    3.405797    .9899323          1          5
    headroom |        74    2.993243    .8459948        1.5          5
-------------+--------------------------------------------------------
       trunk |        74    13.75676    4.277404          5         23
      weight |        74    3019.459    777.1936       1760       4840
      length |        74    187.9324    22.26634        142        233
        turn |        74    39.64865    4.399354         31         51
displacement |        74    197.2973    91.83722         79        425
-------------+--------------------------------------------------------
  gear_ratio |        74    3.014865    .4562871       2.19       3.89
     foreign |         0
  tenperprice |        74    616.5257    294.9496      329.1     1590.6

. list

     +---------------------------------------------------------------------------------------------------------------------------------+
     |              make   price   mpg   rep78   headroom   trunk   weight   length   turn   displa~t   gear_r~o    foreign   tenper~e |
     +---------------------------------------------------------------------------------------------------------------------------------+
  1. | Linc. Continental   11497    12       3        3.5      22     4840      233     51        400       2.47   Domestic     1149.7 |
  2. |      Linc. Mark V   13594    12       3        2.5      18     4720      230     48        400       2.47   Domestic     1359.4 |
  3. |  Linc. Versailles   13466    14       3        3.5      15     3830      201     41        302       2.47   Domestic     1346.6 |
  4. |        Merc. XR-7    6303    14       4          3      16     4130      217     45        302       2.75   Domestic      630.3 |
  5. |      Cad. Deville   11385    14       3          4      20     4330      221     44        425       2.28   Domestic     1138.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
  6. |       Peugeot 604   12990    14       .        3.5      14     3420      192     38        163       3.58    Foreign       1299 |
  7. |     Cad. Eldorado   14500    14       2        3.5      16     3900      204     43        350       2.19   Domestic       1450 |
  8. |      Merc. Cougar    5379    14       4        3.5      16     4060      221     48        302       2.75   Domestic      537.9 |
  9. |     Buick Electra    7827    15       4          4      20     4080      222     43        350       2.41   Domestic      782.7 |
 10. |     Merc. Marquis    6165    15       3        3.5      23     3720      212     44        302       2.26   Domestic      616.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 11. |     Olds Toronado   10371    16       3        3.5      17     4030      206     43        350       2.41   Domestic     1037.1 |
 12. |     Buick Riviera   10372    16       3        3.5      17     3880      207     43        231       2.93   Domestic     1037.2 |
 13. |      Dodge Magnum    5886    16       2          4      17     3600      206     46        318       2.47   Domestic      588.6 |
 14. |      Chev. Impala    5705    16       4          4      20     3690      212     43        250       2.56   Domestic      570.5 |
 15. |         Volvo 260   11995    17       5        2.5      14     3170      193     37        163       2.98    Foreign     1199.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 16. |         Audi 5000    9690    17       5          3      15     2830      189     37        131        3.2    Foreign        969 |
 17. |         AMC Pacer    4749    17       3          3      11     3350      173     40        258       2.53   Domestic      474.9 |
 18. |   Dodge St. Regis    6342    17       2        4.5      21     3740      220     46        225       2.94   Domestic      634.2 |
 19. |    Pont. Firebird    4934    18       1        1.5       7     3470      198     42        231       3.08   Domestic      493.4 |
 20. |     Olds Delta 88    4890    18       4          4      20     3690      218     42        231       2.73   Domestic        489 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 21. |     Toyota Corona    5719    18       5          2      11     2670      175     36        134       3.05    Foreign      571.9 |
 22. |    Dodge Diplomat    4010    18       2          4      17     3600      206     46        318       2.47   Domestic        401 |
 23. |     Buick LeSabre    5788    18       3          4      21     3670      218     43        231       2.73   Domestic      578.8 |
 24. |     Merc. Monarch    4516    18       3          3      15     3370      198     41        250       2.43   Domestic      451.6 |
 25. |      Plym. Volare    4060    18       2          5      16     3330      201     44        225       3.23   Domestic        406 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 26. |    Pont. Catalina    5798    18       4          4      20     3700      214     42        231       2.73   Domestic      579.8 |
 27. |     Toyota Celica    5899    18       5        2.5      14     2410      174     36        134       3.06    Foreign      589.9 |
 28. |        Olds Omega    4181    19       3        4.5      14     3370      200     43        231       3.08   Domestic      418.1 |
 29. |      Olds Cutlass    4733    19       3        4.5      16     3300      198     42        231       2.93   Domestic      473.3 |
 30. |     Pont. Phoenix    4424    19       .        3.5      13     3420      203     43        231       3.08   Domestic      442.4 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 31. |        Chev. Nova    3955    19       3        3.5      13     3430      197     43        250       2.56   Domestic      395.5 |
 32. |     Pont. Le Mans    4723    19       3        3.5      17     3200      199     40        231       2.93   Domestic      472.3 |
 33. |  Pont. Grand Prix    5222    19       3          2      16     3210      201     45        231       2.93   Domestic      522.2 |
 34. |     Buick Skylark    4082    19       3        3.5      13     3400      200     42        231       3.08   Domestic      408.2 |
 35. |    Olds Cutl Supr    5172    19       3          2      16     3310      198     42        231       2.93   Domestic      517.2 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 36. |       Buick Regal    5189    20       3          2      16     3280      200     42        196       2.93   Domestic      518.9 |
 37. |      Merc. Zephyr    3291    20       3        3.5      17     2830      195     43        140       3.08   Domestic      329.1 |
 38. |     Buick Century    4816    20       3        4.5      16     3250      196     40        196       2.93   Domestic      481.6 |
 39. |      Cad. Seville   15906    21       3          3      13     4290      204     45        350       2.24   Domestic     1590.6 |
 40. |       Fiat Strada    4296    21       3        2.5      16     2130      161     36        105       3.37    Foreign      429.6 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 41. |        Datsun 810    8129    21       4        2.5       8     2750      184     38        146       3.55    Foreign      812.9 |
 42. |           Olds 98    8814    21       4          4      20     4060      220     43        350       2.41   Domestic      881.4 |
 43. |      Ford Mustang    4187    21       3          2      10     2650      179     43        140       3.08   Domestic      418.7 |
 44. |      Merc. Bobcat    3829    22       4          3       9     2580      169     39        140       2.73   Domestic      382.9 |
 45. | Chev. Monte Carlo    5104    22       2          2      16     3220      200     41        200       2.73   Domestic      510.4 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 46. |       AMC Concord    4099    22       3        2.5      11     2930      186     40        121       3.58   Domestic      409.9 |
 47. |      Chev. Malibu    4504    22       3        3.5      17     3180      193     31        200       2.73   Domestic      450.4 |
 48. |        AMC Spirit    3799    22       .          3      12     2640      168     35        121       3.08   Domestic      379.9 |
 49. |        Datsun 200    6229    23       4        1.5       6     2370      170     35        119       3.89    Foreign      622.9 |
 50. |          Audi Fox    6295    23       3        2.5      11     2070      174     36         97        3.7    Foreign      629.5 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 51. |         VW Dasher    7140    23       4        2.5      12     2160      172     36         97       3.74    Foreign        714 |
 52. |     Pont. Sunbird    4172    24       2          2       7     2690      179     41        151       2.73   Domestic      417.2 |
 53. |       Chev. Monza    3667    24       2          2       7     2750      179     40        151       2.73   Domestic      366.7 |
 54. |     Olds Starfire    4195    24       1          2      10     2730      180     40        151       2.73   Domestic      419.5 |
 55. |        Datsun 510    5079    24       4        2.5       8     2280      170     34        119       3.54    Foreign      507.9 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 56. |      Honda Accord    5799    25       5          3      10     2240      172     36        107       3.05    Foreign      579.9 |
 57. |          BMW 320i    9735    25       4        2.5      12     2650      177     34        121       3.64    Foreign      973.5 |
 58. |       VW Scirocco    6850    25       4          2      16     1990      156     36         97       3.78    Foreign        685 |
 59. |         VW Rabbit    4697    25       4          3      15     1930      155     35         89       3.78    Foreign      469.7 |
 60. |     Plym. Horizon    4482    25       3          4      17     2200      165     36        105       3.37   Domestic      448.2 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 61. |        Buick Opel    4453    26       .          3      10     2230      170     34        304       2.87   Domestic      445.3 |
 62. |     Plym. Sapporo    6486    26       .        1.5       8     2520      182     38        119       3.54   Domestic      648.6 |
 63. |    Renault Le Car    3895    26       3          3      10     1830      142     34         79       3.72    Foreign      389.5 |
 64. |       Plym. Arrow    4647    28       3          2      11     3260      170     37        156       3.05   Domestic      464.7 |
 65. |       Honda Civic    4499    28       4        2.5       5     1760      149     34         91        3.3    Foreign      449.9 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 66. |       Ford Fiesta    4389    28       4        1.5       9     1800      147     33         98       3.15   Domestic      438.9 |
 67. |    Chev. Chevette    3299    29       3        2.5       9     2110      163     34        231       2.93   Domestic      329.9 |
 68. |        Dodge Colt    3984    30       5          2       8     2120      163     35         98       3.54   Domestic      398.4 |
 69. |         Mazda GLC    3995    30       4        3.5      11     1980      154     33         86       3.73    Foreign      399.5 |
 70. |    Toyota Corolla    3748    31       5          3       9     2200      165     35         97       3.21    Foreign      374.8 |
     +---------------------------------------------------------------------------------------------------------------------------------+
 71. |       Plym. Champ    4425    34       5        2.5      11     1800      157     37         86       2.97   Domestic      442.5 |
 72. |            Subaru    3798    35       5        2.5      11     2050      164     36         97       3.81    Foreign      379.8 |
 73. |        Datsun 210    4589    35       5          2       8     2020      165     32         85        3.7    Foreign      458.9 |
 74. |         VW Diesel    5397    41       5          3      15     2040      155     35         90       3.78    Foreign      539.7 |
     +---------------------------------------------------------------------------------------------------------------------------------+

. gen pricesq = price^2

. replace pricesq = price/1000
(74 real changes made)

. egen average = mean(price)

. list

     +------------------------------------------------------------------------------------------------------------------------------------------------------+
     |              make   price   mpg   rep78   headroom   trunk   weight   length   turn   displa~t   gear_r~o    foreign   tenper~e   pricesq    average |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
  1. | Linc. Continental   11497    12       3        3.5      22     4840      233     51        400       2.47   Domestic     1149.7    11.497   6165.257 |
  2. |      Linc. Mark V   13594    12       3        2.5      18     4720      230     48        400       2.47   Domestic     1359.4    13.594   6165.257 |
  3. |  Linc. Versailles   13466    14       3        3.5      15     3830      201     41        302       2.47   Domestic     1346.6    13.466   6165.257 |
  4. |        Merc. XR-7    6303    14       4          3      16     4130      217     45        302       2.75   Domestic      630.3     6.303   6165.257 |
  5. |      Cad. Deville   11385    14       3          4      20     4330      221     44        425       2.28   Domestic     1138.5    11.385   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
  6. |       Peugeot 604   12990    14       .        3.5      14     3420      192     38        163       3.58    Foreign       1299     12.99   6165.257 |
  7. |     Cad. Eldorado   14500    14       2        3.5      16     3900      204     43        350       2.19   Domestic       1450      14.5   6165.257 |
  8. |      Merc. Cougar    5379    14       4        3.5      16     4060      221     48        302       2.75   Domestic      537.9     5.379   6165.257 |
  9. |     Buick Electra    7827    15       4          4      20     4080      222     43        350       2.41   Domestic      782.7     7.827   6165.257 |
 10. |     Merc. Marquis    6165    15       3        3.5      23     3720      212     44        302       2.26   Domestic      616.5     6.165   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 11. |     Olds Toronado   10371    16       3        3.5      17     4030      206     43        350       2.41   Domestic     1037.1    10.371   6165.257 |
 12. |     Buick Riviera   10372    16       3        3.5      17     3880      207     43        231       2.93   Domestic     1037.2    10.372   6165.257 |
 13. |      Dodge Magnum    5886    16       2          4      17     3600      206     46        318       2.47   Domestic      588.6     5.886   6165.257 |
 14. |      Chev. Impala    5705    16       4          4      20     3690      212     43        250       2.56   Domestic      570.5     5.705   6165.257 |
 15. |         Volvo 260   11995    17       5        2.5      14     3170      193     37        163       2.98    Foreign     1199.5    11.995   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 16. |         Audi 5000    9690    17       5          3      15     2830      189     37        131        3.2    Foreign        969      9.69   6165.257 |
 17. |         AMC Pacer    4749    17       3          3      11     3350      173     40        258       2.53   Domestic      474.9     4.749   6165.257 |
 18. |   Dodge St. Regis    6342    17       2        4.5      21     3740      220     46        225       2.94   Domestic      634.2     6.342   6165.257 |
 19. |    Pont. Firebird    4934    18       1        1.5       7     3470      198     42        231       3.08   Domestic      493.4     4.934   6165.257 |
 20. |     Olds Delta 88    4890    18       4          4      20     3690      218     42        231       2.73   Domestic        489      4.89   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 21. |     Toyota Corona    5719    18       5          2      11     2670      175     36        134       3.05    Foreign      571.9     5.719   6165.257 |
 22. |    Dodge Diplomat    4010    18       2          4      17     3600      206     46        318       2.47   Domestic        401      4.01   6165.257 |
 23. |     Buick LeSabre    5788    18       3          4      21     3670      218     43        231       2.73   Domestic      578.8     5.788   6165.257 |
 24. |     Merc. Monarch    4516    18       3          3      15     3370      198     41        250       2.43   Domestic      451.6     4.516   6165.257 |
 25. |      Plym. Volare    4060    18       2          5      16     3330      201     44        225       3.23   Domestic        406      4.06   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 26. |    Pont. Catalina    5798    18       4          4      20     3700      214     42        231       2.73   Domestic      579.8     5.798   6165.257 |
 27. |     Toyota Celica    5899    18       5        2.5      14     2410      174     36        134       3.06    Foreign      589.9     5.899   6165.257 |
 28. |        Olds Omega    4181    19       3        4.5      14     3370      200     43        231       3.08   Domestic      418.1     4.181   6165.257 |
 29. |      Olds Cutlass    4733    19       3        4.5      16     3300      198     42        231       2.93   Domestic      473.3     4.733   6165.257 |
 30. |     Pont. Phoenix    4424    19       .        3.5      13     3420      203     43        231       3.08   Domestic      442.4     4.424   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 31. |        Chev. Nova    3955    19       3        3.5      13     3430      197     43        250       2.56   Domestic      395.5     3.955   6165.257 |
 32. |     Pont. Le Mans    4723    19       3        3.5      17     3200      199     40        231       2.93   Domestic      472.3     4.723   6165.257 |
 33. |  Pont. Grand Prix    5222    19       3          2      16     3210      201     45        231       2.93   Domestic      522.2     5.222   6165.257 |
 34. |     Buick Skylark    4082    19       3        3.5      13     3400      200     42        231       3.08   Domestic      408.2     4.082   6165.257 |
 35. |    Olds Cutl Supr    5172    19       3          2      16     3310      198     42        231       2.93   Domestic      517.2     5.172   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 36. |       Buick Regal    5189    20       3          2      16     3280      200     42        196       2.93   Domestic      518.9     5.189   6165.257 |
 37. |      Merc. Zephyr    3291    20       3        3.5      17     2830      195     43        140       3.08   Domestic      329.1     3.291   6165.257 |
 38. |     Buick Century    4816    20       3        4.5      16     3250      196     40        196       2.93   Domestic      481.6     4.816   6165.257 |
 39. |      Cad. Seville   15906    21       3          3      13     4290      204     45        350       2.24   Domestic     1590.6    15.906   6165.257 |
 40. |       Fiat Strada    4296    21       3        2.5      16     2130      161     36        105       3.37    Foreign      429.6     4.296   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 41. |        Datsun 810    8129    21       4        2.5       8     2750      184     38        146       3.55    Foreign      812.9     8.129   6165.257 |
 42. |           Olds 98    8814    21       4          4      20     4060      220     43        350       2.41   Domestic      881.4     8.814   6165.257 |
 43. |      Ford Mustang    4187    21       3          2      10     2650      179     43        140       3.08   Domestic      418.7     4.187   6165.257 |
 44. |      Merc. Bobcat    3829    22       4          3       9     2580      169     39        140       2.73   Domestic      382.9     3.829   6165.257 |
 45. | Chev. Monte Carlo    5104    22       2          2      16     3220      200     41        200       2.73   Domestic      510.4     5.104   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 46. |       AMC Concord    4099    22       3        2.5      11     2930      186     40        121       3.58   Domestic      409.9     4.099   6165.257 |
 47. |      Chev. Malibu    4504    22       3        3.5      17     3180      193     31        200       2.73   Domestic      450.4     4.504   6165.257 |
 48. |        AMC Spirit    3799    22       .          3      12     2640      168     35        121       3.08   Domestic      379.9     3.799   6165.257 |
 49. |        Datsun 200    6229    23       4        1.5       6     2370      170     35        119       3.89    Foreign      622.9     6.229   6165.257 |
 50. |          Audi Fox    6295    23       3        2.5      11     2070      174     36         97        3.7    Foreign      629.5     6.295   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 51. |         VW Dasher    7140    23       4        2.5      12     2160      172     36         97       3.74    Foreign        714      7.14   6165.257 |
 52. |     Pont. Sunbird    4172    24       2          2       7     2690      179     41        151       2.73   Domestic      417.2     4.172   6165.257 |
 53. |       Chev. Monza    3667    24       2          2       7     2750      179     40        151       2.73   Domestic      366.7     3.667   6165.257 |
 54. |     Olds Starfire    4195    24       1          2      10     2730      180     40        151       2.73   Domestic      419.5     4.195   6165.257 |
 55. |        Datsun 510    5079    24       4        2.5       8     2280      170     34        119       3.54    Foreign      507.9     5.079   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 56. |      Honda Accord    5799    25       5          3      10     2240      172     36        107       3.05    Foreign      579.9     5.799   6165.257 |
 57. |          BMW 320i    9735    25       4        2.5      12     2650      177     34        121       3.64    Foreign      973.5     9.735   6165.257 |
 58. |       VW Scirocco    6850    25       4          2      16     1990      156     36         97       3.78    Foreign        685      6.85   6165.257 |
 59. |         VW Rabbit    4697    25       4          3      15     1930      155     35         89       3.78    Foreign      469.7     4.697   6165.257 |
 60. |     Plym. Horizon    4482    25       3          4      17     2200      165     36        105       3.37   Domestic      448.2     4.482   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 61. |        Buick Opel    4453    26       .          3      10     2230      170     34        304       2.87   Domestic      445.3     4.453   6165.257 |
 62. |     Plym. Sapporo    6486    26       .        1.5       8     2520      182     38        119       3.54   Domestic      648.6     6.486   6165.257 |
 63. |    Renault Le Car    3895    26       3          3      10     1830      142     34         79       3.72    Foreign      389.5     3.895   6165.257 |
 64. |       Plym. Arrow    4647    28       3          2      11     3260      170     37        156       3.05   Domestic      464.7     4.647   6165.257 |
 65. |       Honda Civic    4499    28       4        2.5       5     1760      149     34         91        3.3    Foreign      449.9     4.499   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 66. |       Ford Fiesta    4389    28       4        1.5       9     1800      147     33         98       3.15   Domestic      438.9     4.389   6165.257 |
 67. |    Chev. Chevette    3299    29       3        2.5       9     2110      163     34        231       2.93   Domestic      329.9     3.299   6165.257 |
 68. |        Dodge Colt    3984    30       5          2       8     2120      163     35         98       3.54   Domestic      398.4     3.984   6165.257 |
 69. |         Mazda GLC    3995    30       4        3.5      11     1980      154     33         86       3.73    Foreign      399.5     3.995   6165.257 |
 70. |    Toyota Corolla    3748    31       5          3       9     2200      165     35         97       3.21    Foreign      374.8     3.748   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+
 71. |       Plym. Champ    4425    34       5        2.5      11     1800      157     37         86       2.97   Domestic      442.5     4.425   6165.257 |
 72. |            Subaru    3798    35       5        2.5      11     2050      164     36         97       3.81    Foreign      379.8     3.798   6165.257 |
 73. |        Datsun 210    4589    35       5          2       8     2020      165     32         85        3.7    Foreign      458.9     4.589   6165.257 |
 74. |         VW Diesel    5397    41       5          3      15     2040      155     35         90       3.78    Foreign      539.7     5.397   6165.257 |
     +------------------------------------------------------------------------------------------------------------------------------------------------------+

. tab foreign, gen(f1)

    foreign |      Freq.     Percent        Cum.
------------+-----------------------------------
   Domestic |         52       70.27       70.27
    Foreign |         22       29.73      100.00
------------+-----------------------------------
      Total |         74      100.00

. list

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+----------+---------+----------+
  1. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | tenper~e | pricesq |  average |
     | Linc. Continental | 11497 |  12 |     3 |      3.5 |    22 |   4840 |    233 |   51 |      400 |     2.47 | Domestic |   1149.7 |  11.497 | 6165.257 |
     +-------------------+-------+-----+-------+----------+-------+--------+----+---+------+----------+----------+----------+----------+---------+----------+
     |                                   f11                                    |                                    f12                                    |
     |                                     1                                    |                                      0                                    |
     +--------------------------------------------------------------------------+---------------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+----------+---------+----------+
  2. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | tenper~e | pricesq |  average |
     |      Linc. Mark V | 13594 |  12 |     3 |      2.5 |    18 |   4720 |    230 |   48 |      400 |     2.47 | Domestic |   1359.4 |  13.594 | 6165.257 |
     +-------------------+-------+-----+-------+----------+-------+--------+----+---+------+----------+----------+----------+----------+---------+----------+
     |                                   f11                                    |                                    f12                                    |
     |                                     1                                    |                                      0                                    |
     +--------------------------------------------------------------------------+---------------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+----------+---------+----------+
  3. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | tenper~e | pricesq |  average |
     |  Linc. Versailles | 13466 |  14 |     3 |      3.5 |    15 |   3830 |    201 |   41 |      302 |     2.47 | Domestic |   1346.6 |  13.466 | 6165.257 |
     +-------------------+-------+-----+-------+----------+-------+--------+----+---+------+----------+----------+----------+----------+---------+----------+
     |                                   f11                                    |                                    f12                                    |
     |                                     1                                    |                                      0                                    |
     +--------------------------------------------------------------------------+---------------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+----------+---------+----------+
  4. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | tenper~e | pricesq |  average |
     |        Merc. XR-7 |  6303 |  14 |     4 |        3 |    16 |   4130 |    217 |   45 |      302 |     2.75 | Domestic |    630.3 |   6.303 | 6165.257 |
     +-------------------+-------+-----+-------+----------+-------+--------+----+---+------+----------+----------+----------+----------+---------+----------+
     |                                   f11                                    |                                    f12                                    |
     |                                     1                                    |                                      0                                    |
     +--------------------------------------------------------------------------+---------------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+----------+---------+----------+
  5. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | tenper~e | pricesq |  average |
     |      Cad. Deville | 11385 |  14 |     3 |        4 |    20 |   4330 |    221 |   44 |      425 |     2.28 | Domestic |   1138.5 |  11.385 | 6165.257 |
     +-------------------+-------+-----+-------+----------+-------+--------+----+---+------+----------+----------+----------+----------+---------+----------+
     |                                   f11                                    |                                    f12                                    |
     |                                     1                                    |                                      0                                    |
     +--------------------------------------------------------------------------+---------------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+----------+---------+----------+
  6. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | tenper~e | pricesq |  average |
     |       Peugeot 604 | 12990 |  14 |     . |      3.5 |    14 |   3420 |    192 |   38 |      163 |     3.58 |  Foreign |     1299 |   12.99 | 6165.257 |
     +-------------------+-------+-----+-------+----------+-------+--------+----+---+------+----------+----------+----------+----------+---------+----------+
     |                                   f11                                    |                                    f12                                    |
     |                                     0                                    |                                      1                                    |
     +--------------------------------------------------------------------------+---------------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+----------+---------+----------+
  7. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | tenper~e | pricesq |  average |
     |     Cad. Eldorado | 14500 |  14 |     2 |      3.5 |    16 |   3900 |    204 |   43 |      350 |     2.19 | Domestic |     1450 |    14.5 | 6165.257 |
     +-------------------+-------+-----+-------+----------+-------+--------+----+---+------+----------+----------+----------+----------+---------+----------+
     |                                   f11                                    |                                    f12                                    |
     |                                   --Break--
r(1);


. drop pricesq

. drop average

. drop tenperprice

. list

     +---------------------------------------------------------------------------------------------------------------------------------------------+
     |              make   price   mpg   rep78   headroom   trunk   weight   length   turn   displa~t   gear_r~o    foreign   f11   f12   lagprice |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
  1. |      Merc. Zephyr    3291    20       3        3.5      17     2830      195     43        140       3.08   Domestic     1     0          . |
  2. |    Chev. Chevette    3299    29       3        2.5       9     2110      163     34        231       2.93   Domestic     1     0          . |
  3. |       Chev. Monza    3667    24       2          2       7     2750      179     40        151       2.73   Domestic     1     0          . |
  4. |    Toyota Corolla    3748    31       5          3       9     2200      165     35         97       3.21    Foreign     0     1          . |
  5. |            Subaru    3798    35       5        2.5      11     2050      164     36         97       3.81    Foreign     0     1          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
  6. |        AMC Spirit    3799    22       .          3      12     2640      168     35        121       3.08   Domestic     1     0       3798 |
  7. |      Merc. Bobcat    3829    22       4          3       9     2580      169     39        140       2.73   Domestic     1     0          . |
  8. |    Renault Le Car    3895    26       3          3      10     1830      142     34         79       3.72    Foreign     0     1          . |
  9. |        Chev. Nova    3955    19       3        3.5      13     3430      197     43        250       2.56   Domestic     1     0          . |
 10. |        Dodge Colt    3984    30       5          2       8     2120      163     35         98       3.54   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 11. |         Mazda GLC    3995    30       4        3.5      11     1980      154     33         86       3.73    Foreign     0     1          . |
 12. |    Dodge Diplomat    4010    18       2          4      17     3600      206     46        318       2.47   Domestic     1     0          . |
 13. |      Plym. Volare    4060    18       2          5      16     3330      201     44        225       3.23   Domestic     1     0          . |
 14. |     Buick Skylark    4082    19       3        3.5      13     3400      200     42        231       3.08   Domestic     1     0          . |
 15. |       AMC Concord    4099    22       3        2.5      11     2930      186     40        121       3.58   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 16. |     Pont. Sunbird    4172    24       2          2       7     2690      179     41        151       2.73   Domestic     1     0          . |
 17. |        Olds Omega    4181    19       3        4.5      14     3370      200     43        231       3.08   Domestic     1     0          . |
 18. |      Ford Mustang    4187    21       3          2      10     2650      179     43        140       3.08   Domestic     1     0          . |
 19. |     Olds Starfire    4195    24       1          2      10     2730      180     40        151       2.73   Domestic     1     0          . |
 20. |       Fiat Strada    4296    21       3        2.5      16     2130      161     36        105       3.37    Foreign     0     1          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 21. |       Ford Fiesta    4389    28       4        1.5       9     1800      147     33         98       3.15   Domestic     1     0          . |
 22. |     Pont. Phoenix    4424    19       .        3.5      13     3420      203     43        231       3.08   Domestic     1     0          . |
 23. |       Plym. Champ    4425    34       5        2.5      11     1800      157     37         86       2.97   Domestic     1     0       4424 |
 24. |        Buick Opel    4453    26       .          3      10     2230      170     34        304       2.87   Domestic     1     0          . |
 25. |     Plym. Horizon    4482    25       3          4      17     2200      165     36        105       3.37   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 26. |       Honda Civic    4499    28       4        2.5       5     1760      149     34         91        3.3    Foreign     0     1          . |
 27. |      Chev. Malibu    4504    22       3        3.5      17     3180      193     31        200       2.73   Domestic     1     0          . |
 28. |     Merc. Monarch    4516    18       3          3      15     3370      198     41        250       2.43   Domestic     1     0          . |
 29. |        Datsun 210    4589    35       5          2       8     2020      165     32         85        3.7    Foreign     0     1          . |
 30. |       Plym. Arrow    4647    28       3          2      11     3260      170     37        156       3.05   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 31. |         VW Rabbit    4697    25       4          3      15     1930      155     35         89       3.78    Foreign     0     1          . |
 32. |     Pont. Le Mans    4723    19       3        3.5      17     3200      199     40        231       2.93   Domestic     1     0          . |
 33. |      Olds Cutlass    4733    19       3        4.5      16     3300      198     42        231       2.93   Domestic     1     0          . |
 34. |         AMC Pacer    4749    17       3          3      11     3350      173     40        258       2.53   Domestic     1     0          . |
 35. |     Buick Century    4816    20       3        4.5      16     3250      196     40        196       2.93   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 36. |     Olds Delta 88    4890    18       4          4      20     3690      218     42        231       2.73   Domestic     1     0          . |
 37. |    Pont. Firebird    4934    18       1        1.5       7     3470      198     42        231       3.08   Domestic     1     0          . |
 38. |        Datsun 510    5079    24       4        2.5       8     2280      170     34        119       3.54    Foreign     0     1          . |
 39. | Chev. Monte Carlo    5104    22       2          2      16     3220      200     41        200       2.73   Domestic     1     0          . |
 40. |    Olds Cutl Supr    5172    19       3          2      16     3310      198     42        231       2.93   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 41. |       Buick Regal    5189    20       3          2      16     3280      200     42        196       2.93   Domestic     1     0          . |
 42. |  Pont. Grand Prix    5222    19       3          2      16     3210      201     45        231       2.93   Domestic     1     0          . |
 43. |      Merc. Cougar    5379    14       4        3.5      16     4060      221     48        302       2.75   Domestic     1     0          . |
 44. |         VW Diesel    5397    41       5          3      15     2040      155     35         90       3.78    Foreign     0     1          . |
 45. |      Chev. Impala    5705    16       4          4      20     3690      212     43        250       2.56   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 46. |     Toyota Corona    5719    18       5          2      11     2670      175     36        134       3.05    Foreign     0     1          . |
 47. |     Buick LeSabre    5788    18       3          4      21     3670      218     43        231       2.73   Domestic     1     0          . |
 48. |    Pont. Catalina    5798    18       4          4      20     3700      214     42        231       2.73   Domestic     1     0          . |
 49. |      Honda Accord    5799    25       5          3      10     2240      172     36        107       3.05    Foreign     0     1       5798 |
 50. |      Dodge Magnum    5886    16       2          4      17     3600      206     46        318       2.47   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 51. |     Toyota Celica    5899    18       5        2.5      14     2410      174     36        134       3.06    Foreign     0     1          . |
 52. |     Merc. Marquis    6165    15       3        3.5      23     3720      212     44        302       2.26   Domestic     1     0          . |
 53. |        Datsun 200    6229    23       4        1.5       6     2370      170     35        119       3.89    Foreign     0     1          . |
 54. |          Audi Fox    6295    23       3        2.5      11     2070      174     36         97        3.7    Foreign     0     1          . |
 55. |        Merc. XR-7    6303    14       4          3      16     4130      217     45        302       2.75   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 56. |   Dodge St. Regis    6342    17       2        4.5      21     3740      220     46        225       2.94   Domestic     1     0          . |
 57. |     Plym. Sapporo    6486    26       .        1.5       8     2520      182     38        119       3.54   Domestic     1     0          . |
 58. |       VW Scirocco    6850    25       4          2      16     1990      156     36         97       3.78    Foreign     0     1          . |
 59. |         VW Dasher    7140    23       4        2.5      12     2160      172     36         97       3.74    Foreign     0     1          . |
 60. |     Buick Electra    7827    15       4          4      20     4080      222     43        350       2.41   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 61. |        Datsun 810    8129    21       4        2.5       8     2750      184     38        146       3.55    Foreign     0     1          . |
 62. |           Olds 98    8814    21       4          4      20     4060      220     43        350       2.41   Domestic     1     0          . |
 63. |         Audi 5000    9690    17       5          3      15     2830      189     37        131        3.2    Foreign     0     1          . |
 64. |          BMW 320i    9735    25       4        2.5      12     2650      177     34        121       3.64    Foreign     0     1          . |
 65. |     Olds Toronado   10371    16       3        3.5      17     4030      206     43        350       2.41   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 66. |     Buick Riviera   10372    16       3        3.5      17     3880      207     43        231       2.93   Domestic     1     0      10371 |
 67. |      Cad. Deville   11385    14       3          4      20     4330      221     44        425       2.28   Domestic     1     0          . |
 68. | Linc. Continental   11497    12       3        3.5      22     4840      233     51        400       2.47   Domestic     1     0          . |
 69. |         Volvo 260   11995    17       5        2.5      14     3170      193     37        163       2.98    Foreign     0     1          . |
 70. |       Peugeot 604   12990    14       .        3.5      14     3420      192     38        163       3.58    Foreign     0     1          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 71. |  Linc. Versailles   13466    14       3        3.5      15     3830      201     41        302       2.47   Domestic     1     0          . |
 72. |      Linc. Mark V   13594    12       3        2.5      18     4720      230     48        400       2.47   Domestic     1     0          . |
 73. |     Cad. Eldorado   14500    14       2        3.5      16     3900      204     43        350       2.19   Domestic     1     0          . |
 74. |      Cad. Seville   15906    21       3          3      13     4290      204     45        350       2.24   Domestic     1     0          . |
     +---------------------------------------------------------------------------------------------------------------------------------------------+

. drop lagprice


. gen lagprice = price[_n-1]
(1 missing value generated)

. list

     +---------------------------------------------------------------------------------------------------------------------------------------------+
     |              make   price   mpg   rep78   headroom   trunk   weight   length   turn   displa~t   gear_r~o    foreign   f11   f12   lagprice |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
  1. |      Merc. Zephyr    3291    20       3        3.5      17     2830      195     43        140       3.08   Domestic     1     0          . |
  2. |    Chev. Chevette    3299    29       3        2.5       9     2110      163     34        231       2.93   Domestic     1     0       3291 |
  3. |       Chev. Monza    3667    24       2          2       7     2750      179     40        151       2.73   Domestic     1     0       3299 |
  4. |    Toyota Corolla    3748    31       5          3       9     2200      165     35         97       3.21    Foreign     0     1       3667 |
  5. |            Subaru    3798    35       5        2.5      11     2050      164     36         97       3.81    Foreign     0     1       3748 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
  6. |        AMC Spirit    3799    22       .          3      12     2640      168     35        121       3.08   Domestic     1     0       3798 |
  7. |      Merc. Bobcat    3829    22       4          3       9     2580      169     39        140       2.73   Domestic     1     0       3799 |
  8. |    Renault Le Car    3895    26       3          3      10     1830      142     34         79       3.72    Foreign     0     1       3829 |
  9. |        Chev. Nova    3955    19       3        3.5      13     3430      197     43        250       2.56   Domestic     1     0       3895 |
 10. |        Dodge Colt    3984    30       5          2       8     2120      163     35         98       3.54   Domestic     1     0       3955 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 11. |         Mazda GLC    3995    30       4        3.5      11     1980      154     33         86       3.73    Foreign     0     1       3984 |
 12. |    Dodge Diplomat    4010    18       2          4      17     3600      206     46        318       2.47   Domestic     1     0       3995 |
 13. |      Plym. Volare    4060    18       2          5      16     3330      201     44        225       3.23   Domestic     1     0       4010 |
 14. |     Buick Skylark    4082    19       3        3.5      13     3400      200     42        231       3.08   Domestic     1     0       4060 |
 15. |       AMC Concord    4099    22       3        2.5      11     2930      186     40        121       3.58   Domestic     1     0       4082 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 16. |     Pont. Sunbird    4172    24       2          2       7     2690      179     41        151       2.73   Domestic     1     0       4099 |
 17. |        Olds Omega    4181    19       3        4.5      14     3370      200     43        231       3.08   Domestic     1     0       4172 |
 18. |      Ford Mustang    4187    21       3          2      10     2650      179     43        140       3.08   Domestic     1     0       4181 |
 19. |     Olds Starfire    4195    24       1          2      10     2730      180     40        151       2.73   Domestic     1     0       4187 |
 20. |       Fiat Strada    4296    21       3        2.5      16     2130      161     36        105       3.37    Foreign     0     1       4195 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 21. |       Ford Fiesta    4389    28       4        1.5       9     1800      147     33         98       3.15   Domestic     1     0       4296 |
 22. |     Pont. Phoenix    4424    19       .        3.5      13     3420      203     43        231       3.08   Domestic     1     0       4389 |
 23. |       Plym. Champ    4425    34       5        2.5      11     1800      157     37         86       2.97   Domestic     1     0       4424 |
 24. |        Buick Opel    4453    26       .          3      10     2230      170     34        304       2.87   Domestic     1     0       4425 |
 25. |     Plym. Horizon    4482    25       3          4      17     2200      165     36        105       3.37   Domestic     1     0       4453 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 26. |       Honda Civic    4499    28       4        2.5       5     1760      149     34         91        3.3    Foreign     0     1       4482 |
 27. |      Chev. Malibu    4504    22       3        3.5      17     3180      193     31        200       2.73   Domestic     1     0       4499 |
 28. |     Merc. Monarch    4516    18       3          3      15     3370      198     41        250       2.43   Domestic     1     0       4504 |
 29. |        Datsun 210    4589    35       5          2       8     2020      165     32         85        3.7    Foreign     0     1       4516 |
 30. |       Plym. Arrow    4647    28       3          2      11     3260      170     37        156       3.05   Domestic     1     0       4589 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 31. |         VW Rabbit    4697    25       4          3      15     1930      155     35         89       3.78    Foreign     0     1       4647 |
 32. |     Pont. Le Mans    4723    19       3        3.5      17     3200      199     40        231       2.93   Domestic     1     0       4697 |
 33. |      Olds Cutlass    4733    19       3        4.5      16     3300      198     42        231       2.93   Domestic     1     0       4723 |
 34. |         AMC Pacer    4749    17       3          3      11     3350      173     40        258       2.53   Domestic     1     0       4733 |
 35. |     Buick Century    4816    20       3        4.5      16     3250      196     40        196       2.93   Domestic     1     0       4749 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 36. |     Olds Delta 88    4890    18       4          4      20     3690      218     42        231       2.73   Domestic     1     0       4816 |
 37. |    Pont. Firebird    4934    18       1        1.5       7     3470      198     42        231       3.08   Domestic     1     0       4890 |
 38. |        Datsun 510    5079    24       4        2.5       8     2280      170     34        119       3.54    Foreign     0     1       4934 |
 39. | Chev. Monte Carlo    5104    22       2          2      16     3220      200     41        200       2.73   Domestic     1     0       5079 |
 40. |    Olds Cutl Supr    5172    19       3          2      16     3310      198     42        231       2.93   Domestic     1     0       5104 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 41. |       Buick Regal    5189    20       3          2      16     3280      200     42        196       2.93   Domestic     1     0       5172 |
 42. |  Pont. Grand Prix    5222    19       3          2      16     3210      201     45        231       2.93   Domestic     1     0       5189 |
 43. |      Merc. Cougar    5379    14       4        3.5      16     4060      221     48        302       2.75   Domestic     1     0       5222 |
 44. |         VW Diesel    5397    41       5          3      15     2040      155     35         90       3.78    Foreign     0     1       5379 |
 45. |      Chev. Impala    5705    16       4          4      20     3690      212     43        250       2.56   Domestic     1     0       5397 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 46. |     Toyota Corona    5719    18       5          2      11     2670      175     36        134       3.05    Foreign     0     1       5705 |
 47. |     Buick LeSabre    5788    18       3          4      21     3670      218     43        231       2.73   Domestic     1     0       5719 |
 48. |    Pont. Catalina    5798    18       4          4      20     3700      214     42        231       2.73   Domestic     1     0       5788 |
 49. |      Honda Accord    5799    25       5          3      10     2240      172     36        107       3.05    Foreign     0     1       5798 |
 50. |      Dodge Magnum    5886    16       2          4      17     3600      206     46        318       2.47   Domestic     1     0       5799 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 51. |     Toyota Celica    5899    18       5        2.5      14     2410      174     36        134       3.06    Foreign     0     1       5886 |
 52. |     Merc. Marquis    6165    15       3        3.5      23     3720      212     44        302       2.26   Domestic     1     0       5899 |
 53. |        Datsun 200    6229    23       4        1.5       6     2370      170     35        119       3.89    Foreign     0     1       6165 |
 54. |          Audi Fox    6295    23       3        2.5      11     2070      174     36         97        3.7    Foreign     0     1       6229 |
 55. |        Merc. XR-7    6303    14       4          3      16     4130      217     45        302       2.75   Domestic     1     0       6295 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 56. |   Dodge St. Regis    6342    17       2        4.5      21     3740      220     46        225       2.94   Domestic     1     0       6303 |
 57. |     Plym. Sapporo    6486    26       .        1.5       8     2520      182     38        119       3.54   Domestic     1     0       6342 |
 58. |       VW Scirocco    6850    25       4          2      16     1990      156     36         97       3.78    Foreign     0     1       6486 |
 59. |         VW Dasher    7140    23       4        2.5      12     2160      172     36         97       3.74    Foreign     0     1       6850 |
 60. |     Buick Electra    7827    15       4          4      20     4080      222     43        350       2.41   Domestic     1     0       7140 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 61. |        Datsun 810    8129    21       4        2.5       8     2750      184     38        146       3.55    Foreign     0     1       7827 |
 62. |           Olds 98    8814    21       4          4      20     4060      220     43        350       2.41   Domestic     1     0       8129 |
 63. |         Audi 5000    9690    17       5          3      15     2830      189     37        131        3.2    Foreign     0     1       8814 |
 64. |          BMW 320i    9735    25       4        2.5      12     2650      177     34        121       3.64    Foreign     0     1       9690 |
 65. |     Olds Toronado   10371    16       3        3.5      17     4030      206     43        350       2.41   Domestic     1     0       9735 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 66. |     Buick Riviera   10372    16       3        3.5      17     3880      207     43        231       2.93   Domestic     1     0      10371 |
 67. |      Cad. Deville   11385    14       3          4      20     4330      221     44        425       2.28   Domestic     1     0      10372 |
 68. | Linc. Continental   11497    12       3        3.5      22     4840      233     51        400       2.47   Domestic     1     0      11385 |
 69. |         Volvo 260   11995    17       5        2.5      14     3170      193     37        163       2.98    Foreign     0     1      11497 |
 70. |       Peugeot 604   12990    14       .        3.5      14     3420      192     38        163       3.58    Foreign     0     1      11995 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+
 71. |  Linc. Versailles   13466    14       3        3.5      15     3830      201     41        302       2.47   Domestic     1     0      12990 |
 72. |      Linc. Mark V   13594    12       3        2.5      18     4720      230     48        400       2.47   Domestic     1     0      13466 |
 73. |     Cad. Eldorado   14500    14       2        3.5      16     3900      204     43        350       2.19   Domestic     1     0      13594 |
 74. |      Cad. Seville   15906    21       3          3      13     4290      204     45        350       2.24   Domestic     1     0      14500 |
     +---------------------------------------------------------------------------------------------------------------------------------------------+

. reg price mpg rep78 trunk

      Source |       SS       df       MS              Number of obs =      69
-------------+------------------------------           F(  3,    65) =    7.36
       Model |   146273560     3  48757853.3           Prob > F      =  0.0003
    Residual |   430523399    65  6623436.91           R-squared     =  0.2536
-------------+------------------------------           Adj R-squared =  0.2191
       Total |   576796959    68  8482308.22           Root MSE      =  2573.6

-------------+----------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         mpg |  -252.2659   70.80629    -3.56   0.001    -393.6758   -110.8559
       rep78 |   650.0531   346.1759     1.88   0.065    -41.30784    1341.414
       trunk |   42.46636   88.66186     0.48   0.634    -134.6036    219.5363
       _cons |   8711.347   2395.593     3.64   0.001     3927.018    13495.68
-------------+----------------------------------------------------------------

. reg price mpg rep78 trunk, robust

Linear regression                                      Number of obs =      69
                                                       F(  3,    65) =    9.64
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.2536
                                                       Root MSE      =  2573.6

-------------+----------------------------------------------------------------
             |               Robust
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         mpg |  -252.2659     71.692    -3.52   0.001    -395.4447   -109.0871
       rep78 |   650.0531   269.5068     2.41   0.019     111.8109    1188.295
       trunk |   42.46636   65.72395     0.65   0.520    -88.79344    173.7262
       _cons |   8711.347   2292.103     3.80   0.000     4133.701    13288.99
-------------+----------------------------------------------------------------

. vce

Covariance matrix of coefficients of regress model

e(V)   | mpg    rep78    trunk    _cons
-------------+------------------------------------------------
mpg   |  5139.7427
rep78   | -5842.0922     72633.902
trunk   |   3088.025    -2549.2939     4319.6379
_cons   | -141151.76    -90212.195    -117944.11     5253736.5

. test mpg=rep78

 ( 1)  mpg - rep78 = 0

       F(  1,    65) =    9.10
            Prob > F =    0.0036

. reg price mpg rep78 trunk weight, robust

Linear regression                                      Number of obs =      69
                                                       F(  4,    64) =    9.53
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.3763
                                                       Root MSE      =  2370.8

-------------+----------------------------------------------------------------
             |               Robust
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         mpg |  -63.21042   84.65868    -0.75   0.458    -232.3356    105.9147
       rep78 |   884.4482   285.4206     3.10   0.003     314.2549    1454.641
       trunk |   -99.3673   83.72343    -1.19   0.240    -266.6241    67.88949
      weight |   2.441996    .927643     2.63   0.011     .5888166    4.295176
       _cons |  -1540.729   3776.598    -0.41   0.685    -9085.351    6003.893
-------------+----------------------------------------------------------------

. test mpg=trunk

 ( 1)  mpg - trunk = 0

       F(  1,    64) =    0.07
            Prob > F =    0.7863

. predict yhat, xb
(5 missing values generated)

. predict uhat, resid
(5 missing values generated)

. list

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
  1. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | f11 | f12 | lagprice |
     |      Merc. Zephyr |  3291 |  20 |     3 |      3.5 |    17 |   2830 |    195 |   43 |      140 |     3.08 | Domestic |   1 |   0 |        . |
     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
     |                                  yhat                               |                                    uhat                               |
     |                              5070.013                               |                               -1779.013                               |
     +---------------------------------------------------------------------+-----------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
  2. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | f11 | f12 | lagprice |
     |    Chev. Chevette |  3299 |  29 |     3 |      2.5 |     9 |   2110 |    163 |   34 |      231 |     2.93 | Domestic |   1 |   0 |     3291 |
     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
     |                                  yhat                               |                                    uhat                               |
     |                               3537.82                               |                               -238.8199                               |
     +---------------------------------------------------------------------+-----------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
  3. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | f11 | f12 | lagprice |
     |       Chev. Monza |  3667 |  24 |     2 |        2 |     7 |   2750 |    179 |   40 |      151 |     2.73 | Domestic |   1 |   0 |     3299 |
     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
     |                                  yhat                               |                                    uhat                               |
     |                              4731.036                               |                               -1064.036                               |
     +---------------------------------------------------------------------+-----------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
  4. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | f11 | f12 | lagprice |
     |    Toyota Corolla |  3748 |  31 |     5 |        3 |     9 |   2200 |    165 |   35 |       97 |     3.21 |  Foreign |   0 |   1 |     3667 |
     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
     |                                  yhat                               |                                    uhat                               |
     |                              5400.075                               |                               -1652.075                               |
     +---------------------------------------------------------------------+-----------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
  5. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | f11 | f12 | lagprice |
     |            Subaru |  3798 |  35 |     5 |      2.5 |    11 |   2050 |    164 |   36 |       97 |     3.81 |  Foreign |   0 |   1 |     3748 |
     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
     |                                  yhat                               |                                    uhat                               |
     |                              4582.199                               |                               -784.1993                               |
     +---------------------------------------------------------------------+-----------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
  6. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | f11 | f12 | lagprice |
     |        AMC Spirit |  3799 |  22 |     . |        3 |    12 |   2640 |    168 |   35 |      121 |     3.08 | Domestic |   1 |   0 |     3798 |
     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
     |                                  yhat                               |                                    uhat                               |
     |                                     .                               |                                       .                               |
     +---------------------------------------------------------------------+-----------------------------------------------------------------------+

     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
  7. |              make | price | mpg | rep78 | headroom | trunk | weight | length | turn | displa~t | gear_r~o |  foreign | f11 | f12 | lagprice |
     |      Merc. Bobcat |  3829 |  22 |     4 |        3 |     9 |   2580 |    169 |   39 |      140 |     2.73 | Domestic |   1 |   0 |     3799 |
     +-------------------+-------+-----+-------+----------+-------+--------+--------+------+----------+----------+----------+-----+-----+----------+
     |                                  yhat                               |                                    uhat                               |
     |                              --Break--
r(1);

. whitetst
unrecognized command:  whitetst
r(199);

. dwstat

Number of gaps in sample:  66

Durbin-Watson d-statistic(  5,    69) =  .0129947

. log close
       log:  C:\data\comprev.txt
  log type:  smcl
 closed on:   3 Sep 2008, 23:15:35
-------------