multiple_regression
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 [2017/06/15 05:45] – [무엇부터? 라는 문제] hkimscil | multiple_regression [2019/05/21 22:40] – [Why overall model is significant while IVs are not?] hkimscil | ||
---|---|---|---|
Line 8: | Line 8: | ||
$$Y = a + bX$$ | $$Y = a + bX$$ | ||
- | 라고 할때, 이 regression 공식에 대한 F 값이 통계적으로 유의미하다면, | + | 라고 할때, 이 regression 공식에 대한 F 값이 통계적으로 유의미하다면, |
Multiple regression은 여러 연구학제에서 다양하게 사용된다, | Multiple regression은 여러 연구학제에서 다양하게 사용된다, | ||
Line 150: | Line 150: | ||
| | | | ||
| 1.000 | (Constant) | | 1.000 | (Constant) | ||
- | | | + | | |
| | | | ||
| a Dependent Variable: bankbook | | a Dependent Variable: bankbook | ||
- | b에 대한 (coefficients) 유의도 테스트는 t-test를 이용하여 한다. 위의 표에서 . . . . | ||
+ | ====== Slope test ====== | ||
+ | |||
+ | b에 대한 (coefficients) 유의도 테스트는 t-test를 이용하여 한다. t-test는 기본적으로 트리트먼트효과 (독립변인효과 혹은 차이)를 랜덤에러인 standard error로 나누어서 구하므로, | ||
+ | |||
+ | 독립변인이 하나일 경우에 구한 t 값은 해당 리그레션 모델의 F test값의 제곱근을 씌운 값이 된다. 독립변인이 둘 이상인 경우에는 독립변인 간의 상관관계가 존재하는 경우가 대다수이므로 t 값의 제곱이 꼭 F 값이 되지는 않는다. | ||
+ | |||
+ | ====== Beta coefficients ====== | ||
+ | [[:beta coefficients]] 혹은 Standardized coefficients 참조 | ||
====== e.g., ====== | ====== e.g., ====== | ||
Line 321: | Line 328: | ||
</ | </ | ||
- | ====== | + | ====== |
+ | see https:// | ||
+ | |||
+ | < | ||
+ | > LSS = rnorm(RSS, RSS, 0.1) #Left shoe size - similar to RSS | ||
+ | > cor(LSS, RSS) # | ||
+ | [1] 0.9983294 | ||
+ | > | ||
+ | > weights = 120 + rnorm(RSS, 10*RSS, 10) | ||
+ | > | ||
+ | > ##Fit a joint model | ||
+ | > m = lm(weights ~ LSS + RSS) | ||
+ | > | ||
+ | > ##F-value is very small, but neither LSS or RSS are significant | ||
+ | > summary(m) | ||
+ | |||
+ | Call: | ||
+ | lm(formula = weights ~ LSS + RSS) | ||
+ | |||
+ | Residuals: | ||
+ | 1 | ||
+ | | ||
+ | 8 | ||
+ | | ||
+ | |||
+ | Coefficients: | ||
+ | Estimate Std. Error t value Pr(> | ||
+ | (Intercept) | ||
+ | LSS -27.546 | ||
+ | RSS | ||
+ | --- | ||
+ | Signif. codes: | ||
+ | |||
+ | Residual standard error: 4.508 on 5 degrees of freedom | ||
+ | Multiple R-squared: | ||
+ | F-statistic: | ||
+ | |||
+ | > | ||
+ | > ##Fitting RSS or LSS separately gives a significant result. | ||
+ | > summary(lm(weights ~ LSS)) | ||
+ | |||
+ | Call: | ||
+ | lm(formula = weights ~ LSS) | ||
+ | |||
+ | Residuals: | ||
+ | Min 1Q Median | ||
+ | -11.044 | ||
+ | |||
+ | Coefficients: | ||
+ | Estimate Std. Error t value Pr(> | ||
+ | (Intercept) | ||
+ | LSS | ||
+ | --- | ||
+ | Signif. codes: | ||
+ | |||
+ | Residual standard error: 7.282 on 6 degrees of freedom | ||
+ | Multiple R-squared: | ||
+ | F-statistic: | ||
+ | |||
+ | > | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== The problem of "which one is entered first?" | ||
__그림 여기쯤 수록__ | __그림 여기쯤 수록__ | ||
Line 330: | Line 400: | ||
* Enter method (all at once as if they are not related) | * Enter method (all at once as if they are not related) | ||
* Selection methods | * Selection methods | ||
- | * [[: | + | * [[: |
* Forward selection: X변인들 (predictors) 중 종속변인인 Y와 상관관계가 가장 높은 변인부터 먼저 투입되어 회귀계산이 수행된다. 먼저 투입된 변인은 (상관관계가 높으므로) 이론적으로 종속변인을 설명하는 중요한 요소로 여겨지게 된다. 또한 다음 변인은 우선 투입된 변인을 고려한 상태로 투입된다. | * Forward selection: X변인들 (predictors) 중 종속변인인 Y와 상관관계가 가장 높은 변인부터 먼저 투입되어 회귀계산이 수행된다. 먼저 투입된 변인은 (상관관계가 높으므로) 이론적으로 종속변인을 설명하는 중요한 요소로 여겨지게 된다. 또한 다음 변인은 우선 투입된 변인을 고려한 상태로 투입된다. | ||
* Backward elimination: | * Backward elimination: | ||
Line 339: | Line 409: | ||
* . . . the stepwise procedure defines an a posteriori order based solely on a statistical consideration (the statistical significance of semi-partial correlations) . . . . | * . . . the stepwise procedure defines an a posteriori order based solely on a statistical consideration (the statistical significance of semi-partial correlations) . . . . | ||
====== Determining IVs' role ====== | ====== Determining IVs' role ====== | ||
+ | For a complete explanation and examples, read [[: | ||
https:// | https:// | ||
[{{ : | [{{ : | ||
Line 396: | Line 467: | ||
* LifeSat Score on Life Satisfaction Inventory seven years after College | * LifeSat Score on Life Satisfaction Inventory seven years after College | ||
* Income Income seven years after College (in thousands) | * Income Income seven years after College (in thousands) | ||
+ | |||
====== Resources ====== | ====== Resources ====== |
multiple_regression.txt · Last modified: 2023/10/19 08:39 by hkimscil