-----------------------------------------------------------------------------------

       log:  C:\AAA Miker Files\newer web pages\soc_meth_proj3\section5_2009.log

  log type:  text

 opened on:  24 Feb 2009, 15:27:26

 

. edit

(8 vars, 11 obs pasted into editor)

- preserve

 

*Here above I copied the Anscombe data from Excel to the Stata data editor, then preserved, then closed the data editor window.

 

. graph matrix x1 x2 x3 x4 y1 y2 y3 y4

 

. twoway (scatter y1 x1)

 

. twoway (scatter y1 x1) (lfit y1 x1)

 

. twoway (scatter y4 x4) (lfit y4 x4)

 

. regress y4 x4

 

      Source |       SS       df       MS              Number of obs =      11

-------------+------------------------------           F(  1,     9) =   18.00

       Model |  27.4900007     1  27.4900007           Prob > F      =  0.0022

    Residual |  13.7424908     9  1.52694342           R-squared     =  0.6667

-------------+------------------------------           Adj R-squared =  0.6297

       Total |  41.2324915    10  4.12324915           Root MSE      =  1.2357

 

------------------------------------------------------------------------------

          y4 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          x4 |   .4999091   .1178189     4.24   0.002     .2333841    .7664341

       _cons |   3.001727   1.123921     2.67   0.026     .4592411    5.544213

------------------------------------------------------------------------------

 

. rvfplot

 

. rvfplot, yline(0)

 

. twoway (scatter y2 x2) (lfit y2 x2)

 

. rvfplot, yline(0)

 

. regress y2 x2

 

      Source |       SS       df       MS              Number of obs =      11

-------------+------------------------------           F(  1,     9) =   17.97

       Model |  27.5000024     1  27.5000024           Prob > F      =  0.0022

    Residual |   13.776294     9  1.53069933           R-squared     =  0.6662

-------------+------------------------------           Adj R-squared =  0.6292

       Total |  41.2762964    10  4.12762964           Root MSE      =  1.2372

 

------------------------------------------------------------------------------

          y2 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          x2 |         .5   .1179638     4.24   0.002     .2331475    .7668526

       _cons |   3.000909   1.125303     2.67   0.026     .4552978     5.54652

------------------------------------------------------------------------------

 

. rvfplot, yline(0)

 

. *the rvfplot, residual versus fit plot, is a post-estimation command that you can use after regression.

 

. exit, clear