partial_and_semipartial_correlation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
partial_and_semipartial_correlation [2023/05/31 08:44] – [Partial and semipartial] hkimscil | partial_and_semipartial_correlation [2023/05/31 08:56] – [e.g., 독립변인 들이 서로 독립적일 때의 각각의 설명력] hkimscil | ||
---|---|---|---|
Line 643: | Line 643: | ||
{{pcor.y.x1.x2.v2.png? | {{pcor.y.x1.x2.v2.png? | ||
x2의 영향력을 control한 후에 x1영향력을 보면 64.54%에 달하게 된다. | x2의 영향력을 control한 후에 x1영향력을 보면 64.54%에 달하게 된다. | ||
+ | |||
+ | ====== Why overall model is significant while IVs are not? ====== | ||
+ | see https:// | ||
+ | |||
+ | < | ||
+ | RSS = 3:10 #Right shoe size | ||
+ | LSS = rnorm(RSS, RSS, 0.1) #Left shoe size - similar to RSS | ||
+ | cor(LSS, RSS) # | ||
+ | |||
+ | 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) | ||
+ | </ | ||
+ | |||
+ | |||
+ | < | ||
+ | > LSS = rnorm(RSS, RSS, 0.1) #Left shoe size - similar to RSS | ||
+ | > cor(LSS, RSS) # | ||
+ | [1] 0.9994836 | ||
+ | > | ||
+ | > 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 | ||
+ | | ||
+ | |||
+ | Coefficients: | ||
+ | Estimate Std. Error t value Pr(> | ||
+ | (Intercept) | ||
+ | LSS -14.162 | ||
+ | RSS | ||
+ | --- | ||
+ | Signif. codes: | ||
+ | |||
+ | Residual standard error: 7.296 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: | ||
+ | | ||
+ | -6.055 -4.930 -2.925 | ||
+ | |||
+ | Coefficients: | ||
+ | Estimate Std. Error t value Pr(> | ||
+ | (Intercept) | ||
+ | LSS | ||
+ | --- | ||
+ | Signif. codes: | ||
+ | |||
+ | Residual standard error: 7.026 on 6 degrees of freedom | ||
+ | Multiple R-squared: | ||
+ | F-statistic: | ||
+ | |||
+ | > | ||
+ | </ | ||
+ | |||
partial_and_semipartial_correlation.txt · Last modified: 2023/05/31 08:56 by hkimscil