multiple_regression_examples
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
multiple_regression_examples [2017/05/31 10:05] – [Regression Diagnostics] hkimscil | multiple_regression_examples [2019/11/01 12:13] – [Model objects] hkimscil | ||
---|---|---|---|
Line 110: | Line 110: | ||
x3 work ethic | x3 work ethic | ||
</ | </ | ||
+ | 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 | ||
+ | | x2 | .769 | .594 | 0.591361 | ||
+ | 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: | ||
| | ||
</ | </ | ||
+ | |||
+ | ====== e.g., ====== | ||
+ | < | ||
+ | > stepAIC(lm.full) | ||
+ | Start: | ||
+ | Sales ~ CompPrice + Income + Advertising + Population + Price + | ||
+ | ShelveLoc + Age + Education + Urban + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - Population | ||
+ | - Education | ||
+ | - Urban 1 1.23 404.06 | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 217.44 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=25.15 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age + Education + Urban + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - Urban 1 1.15 404.31 | ||
+ | - Education | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 218.52 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=24.29 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age + Education + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - Education | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 217.59 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=23.72 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 217.97 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=23.32 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age | ||
+ | |||
+ | Df Sum of Sq | ||
+ | < | ||
+ | - Income | ||
+ | - Age 1 219.12 | ||
+ | - Advertising | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Call: | ||
+ | lm(formula = Sales ~ CompPrice + Income + Advertising + Price + | ||
+ | ShelveLoc + Age, data = Carseats) | ||
+ | |||
+ | Coefficients: | ||
+ | (Intercept) | ||
+ | 5.47523 | ||
+ | Price ShelveLocGood | ||
+ | | ||
+ | |||
+ | > | ||
+ | </ | ||
+ |
multiple_regression_examples.txt · Last modified: 2023/10/21 13:26 by hkimscil