UCLA Academic Technology Services HomeServicesClassesContactJobs
Help the Stat Consulting Group by giving a gift             
Loading

SAS Textbook Examples
Applied Regression Analysis by John Fox
Chapter 6: Statistical Inference for Regression

The following illustrates how to obtain the results for the examples shown in Chapter 6 of Fox.

Results using data file davis at bottom of page 117 and at top of page 118. We use only the subset of observations on women and correct an error on case 12. Proc reg with model option clb produces all the results here.
data davis_co;
  set davis;
  if _n_=12 then do
  temp=measht;
  measht=measwt;
  measwt=temp;
  end;
  drop temp male;
  if male =0;
run;
proc reg data=davis_co;
  model measwt=reptwt/clb;
run;
quit;

The REG Procedure
Model: MODEL1
Dependent Variable: measwt

                             Analysis of Variance

                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F

Model                     1     4334.88935     4334.88935    1024.54    <.0001
Error                    99      418.87303        4.23104
Corrected Total         100     4753.76238


Root MSE              2.05695    R-Square     0.9119
Dependent Mean       57.22772    Adj R-Sq     0.9110
Coeff Var             3.59432

                                    Parameter Estimates

                   Parameter      Standard
Variable    DF      Estimate         Error   t Value   Pr > |t|     95% Confidence Limits

Intercept    1       1.77750       1.74441      1.02     0.3107      -1.68378       5.23879
reptwt       1       0.97722       0.03053     32.01     <.0001       0.91665       1.03780

Page 122 shows how to get confidence intervals in a multiple regression, analyzing the duncan prestige data file. proc reg with the model option clb gives the 95% confidence limits. It also gives the analysis of variance table at bottom of page 123.

proc reg data=duncan;
  model prestige=income educ /clb;
run;
quit;

The REG Procedure
Model: MODEL1
Dependent Variable: prestige

                             Analysis of Variance

                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F

Model                     2          36181          18090     101.22    <.0001
Error                    42     7506.69865      178.73092
Corrected Total          44          43688


Root MSE             13.36903    R-Square     0.8282
Dependent Mean       47.68889    Adj R-Sq     0.8200
Coeff Var            28.03384

                                    Parameter Estimates

                   Parameter      Standard
Variable    DF      Estimate         Error   t Value   Pr > |t|     95% Confidence Limits

Intercept    1      -6.06466       4.27194     -1.42     0.1631     -14.68579       2.55646
income       1       0.59873       0.11967      5.00     <.0001       0.35723       0.84023
educ         1       0.54583       0.09825      5.56     <.0001       0.34755       0.74412

Page 125 shows how you can test whether a subset of the slopes are equal to 0. This is done in SAS using proc reg with the test option.

proc reg data=duncan;
  model prestige=income educ;
  prest_educ: test educ=0;
run;
quit;

The REG Procedure
Model: MODEL1
Dependent Variable: prestige

                             Analysis of Variance

                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F

Model                     2          36181          18090     101.22    <.0001
Error                    42     7506.69865      178.73092
Corrected Total          44          43688


Root MSE             13.36903    R-Square     0.8282
Dependent Mean       47.68889    Adj R-Sq     0.8200
Coeff Var            28.03384

                        Parameter Estimates

                     Parameter       Standard
Variable     DF       Estimate          Error    t Value    Pr > |t|

Intercept     1       -6.06466        4.27194      -1.42      0.1631
income        1        0.59873        0.11967       5.00      <.0001
educ          1        0.54583        0.09825       5.56      <.0001

The REG Procedure
Model: MODEL1

 Test PREST_EDUC Results for Dependent Variable prestige

                                Mean
Source             DF         Square    F Value    Pr > F

Numerator           1     5516.10148      30.86    <.0001
Denominator        42      178.73092

How to cite this page

Report an error on this page or leave a comment

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California