multiple_regression_exercise
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| multiple_regression_exercise [2025/10/30 13:17] – [추가설명] hkimscil | multiple_regression_exercise [2025/10/30 13:28] (current) – [추가설명] hkimscil | ||
|---|---|---|---|
| Line 310: | Line 310: | ||
| 아래는 Advertising을 없애질 않고 ShelveLoc을 없앤것이라서 약간 다르게 보이지만 요지는 같습니다. | 아래는 Advertising을 없애질 않고 ShelveLoc을 없앤것이라서 약간 다르게 보이지만 요지는 같습니다. | ||
| < | < | ||
| - | > | ||
| > lm.1 <- lm(Sales ~ Advertising + Advertising: | > lm.1 <- lm(Sales ~ Advertising + Advertising: | ||
| - | > lm.1 | + | > summary(lm.1) |
| Call: | Call: | ||
| lm(formula = Sales ~ Advertising + Advertising: | lm(formula = Sales ~ Advertising + Advertising: | ||
| + | |||
| + | Residuals: | ||
| + | Min 1Q Median | ||
| + | -6.7650 -1.7351 -0.1523 | ||
| Coefficients: | Coefficients: | ||
| - | | + | Estimate Std. Error t value Pr(> |
| - | 6.76500 -0.05412 | + | (Intercept) |
| + | Advertising | ||
| + | Advertising: | ||
| + | Advertising: | ||
| + | --- | ||
| + | Signif. codes: | ||
| + | |||
| + | Residual standard error: 2.476 on 396 degrees of freedom | ||
| + | Multiple R-squared: | ||
| + | F-statistic: | ||
| + | |||
| + | > | ||
| </ | </ | ||
| 위에서 prediction model 식을 완성한다고 하면 | 위에서 prediction model 식을 완성한다고 하면 | ||
| - | * Sales hat = 6.76500 - 0.05412 * Advertising | + | |
| - | * Sales hat = 6.76500 | + | * Sales hat = 6.76500 |
| - | * Sales hat = 6.76500 - (0.20334)*Advertising | + | * Sales hat = **6.76500 - (0.0951)*Advertising** |
| - | * Sales hat = 6.76500 | + | * Sales hat = 6.76500 |
| - | * Sales hat = 6.76500 - (0.41009)*Advertising | + | |
| 라고 하겠습니다. | 라고 하겠습니다. | ||
| Line 425: | Line 439: | ||
| </ | </ | ||
| + | 1) Bad 인 경우는 | ||
| + | * **Sales hat = 6.76500 + -0.05412*Advertising** 이 됩니다. | ||
| - | 1) ShelveLoc Good일 경우, ShelveLOcGood = 1이고 나머지는 0이므로 | + | 2) ShelveLoc Good일 경우, ShelveLOcGood = 1이고 나머지는 0이므로 |
| - | Sales hat = Intercept + Advertising: | + | |
| - | Sales hat = 6.76500 + 0.30185 | + | * **Sales hat = 6.76500 + 0.30185*Advertising** |
| - | * 위의 <fc # | + | * 위의 <fc # |
| - | * Advertising: | + | * Advertising: |
| - | * Ad coefficient (0.30185) * SelfveLoc-Good | + | * Ad coefficient (0.30185) * SelfveLocGood |
| - | * 이라는 이야기입니다. | + | |
| - | 2) ShelveLoc Medium일 경우는 | + | 3) ShelveLoc Medium일 경우는 |
| - | Sales hat = 6.76500 + 0.09510 * Advertising | + | * **Sales hat = 6.76500 + 0.09510 * Advertising** 이 됩니다 |
| - | + | ||
| - | 3) Bad 인 경우는 | + | |
| - | Sales hat = 6.76500 + -0.05412 | + | |
| 위는 결국 lm.1 과 같은 모델이라는 뜻입니다. | 위는 결국 lm.1 과 같은 모델이라는 뜻입니다. | ||
| - | < | ||
| - | > summary(lm.1) | ||
| - | |||
| - | Call: | ||
| - | lm(formula = Sales ~ Advertising + Advertising: | ||
| - | |||
| - | Residuals: | ||
| - | Min 1Q Median | ||
| - | -6.7650 -1.7351 -0.1523 | ||
| - | |||
| - | Coefficients: | ||
| - | Estimate Std. Error t value Pr(> | ||
| - | (Intercept) | ||
| - | Advertising | ||
| - | Advertising: | ||
| - | Advertising: | ||
| - | --- | ||
| - | Signif. codes: | ||
| - | |||
| - | Residual standard error: 2.476 on 396 degrees of freedom | ||
| - | Multiple R-squared: | ||
| - | F-statistic: | ||
| - | |||
| - | > | ||
| - | |||
| - | |||
| - | </ | ||
multiple_regression_exercise.1761797829.txt.gz · Last modified: by hkimscil
