User Tools

Site Tools


multiple_regression_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
multiple_regression_examples [2017/05/31 10:05] – [Regression Diagnostics] hkimscilmultiple_regression_examples [2019/11/01 12:13] – [Model objects] hkimscil
Line 110: Line 110:
 x3  work ethic x3  work ethic
 </code> </code>
 +from the above output:
 +| x  | zero-order cor  | part cor  | squared zero-order cor  | squared part cor  | shared square cor |
 +| x1 | .764  | .588  | 0.583696  | 0.345744  | 0.237952  |
 +| x2 | .769  | .594  | 0.591361  | 0.352836  | 0.238525  |
 +note that the values of two raws at the last column are similar. The portion is the shared effects from both x1 and x2.  
 +
 $$ \hat{Y_{i}} = 101.222 + 1.000X1_{i} + 1.071X2_{i} $$ $$ \hat{Y_{i}} = 101.222 + 1.000X1_{i} + 1.071X2_{i} $$
 $$ \hat{Y_{i}} = 101.222 + 1.000 \ \text{intell. ability}_{i} + 1.071 \ \text{work ethic}_{i} $$ $$ \hat{Y_{i}} = 101.222 + 1.000 \ \text{intell. ability}_{i} + 1.071 \ \text{work ethic}_{i} $$
Line 603: Line 609:
          
 </code> </code>
 +
 +====== e.g., ======
 +<code>
 +> stepAIC(lm.full)
 +Start:  AIC=26.82
 +Sales ~ CompPrice + Income + Advertising + Population + Price + 
 +    ShelveLoc + Age + Education + Urban + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- Population        0.33  403.16  25.15
 +- Education    1      1.19  404.02  26.00
 +- Urban        1      1.23  404.06  26.04
 +- US                1.57  404.40  26.38
 +<none>                      402.83  26.82
 +- Income           76.16  478.99  94.09
 +- Advertising  1    127.14  529.97 134.54
 +- Age          1    217.44  620.27 197.48
 +- CompPrice    1    519.91  922.74 356.35
 +- ShelveLoc    2   1053.20 1456.03 536.80
 +- Price        1   1323.23 1726.06 606.85
 +
 +Step:  AIC=25.15
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age + Education + Urban + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- Urban        1      1.15  404.31  24.29
 +- Education    1      1.36  404.52  24.49
 +- US                1.89  405.05  25.02
 +<none>                      403.16  25.15
 +- Income           75.94  479.10  92.18
 +- Advertising  1    145.38  548.54 146.32
 +- Age          1    218.52  621.68 196.38
 +- CompPrice    1    521.69  924.85 355.27
 +- ShelveLoc    2   1053.18 1456.34 534.89
 +- Price        1   1323.51 1726.67 605.00
 +
 +Step:  AIC=24.29
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age + Education + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- Education    1      1.44  405.76  23.72
 +- US                1.85  406.16  24.12
 +<none>                      404.31  24.29
 +- Income           76.64  480.96  91.73
 +- Advertising  1    146.03  550.34 145.63
 +- Age          1    217.59  621.91 194.53
 +- CompPrice    1    526.17  930.48 355.69
 +- ShelveLoc    2   1053.93 1458.25 533.41
 +- Price        1   1322.80 1727.11 603.10
 +
 +Step:  AIC=23.72
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- US                1.63  407.39  23.32
 +<none>                      405.76  23.72
 +- Income           77.87  483.62  91.94
 +- Advertising  1    145.30  551.06 144.15
 +- Age          1    217.97  623.73 193.70
 +- CompPrice    1    525.25  931.00 353.92
 +- ShelveLoc    2   1056.88 1462.64 532.61
 +- Price        1   1322.83 1728.58 601.44
 +
 +Step:  AIC=23.32
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age
 +
 +              Df Sum of Sq     RSS    AIC
 +<none>                      407.39  23.32
 +- Income           76.68  484.07  90.30
 +- Age          1    219.12  626.51 193.48
 +- Advertising  1    234.03  641.42 202.89
 +- CompPrice    1    523.83  931.22 352.01
 +- ShelveLoc    2   1055.51 1462.90 530.68
 +- Price        1   1324.42 1731.81 600.18
 +
 +Call:
 +lm(formula = Sales ~ CompPrice + Income + Advertising + Price + 
 +    ShelveLoc + Age, data = Carseats)
 +
 +Coefficients:
 +    (Intercept)        CompPrice           Income      Advertising  
 +        5.47523          0.09257          0.01578          0.11590  
 +          Price    ShelveLocGood  ShelveLocMedium              Age  
 +       -0.09532          4.83567          1.95199         -0.04613  
 +
 +
 +</code>
 +
multiple_regression_examples.txt · Last modified: 2023/10/21 13:26 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki