multicollinearity
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
multicollinearity [2023/05/17 12:10] – [using VIF (Variance Inflation Factors)] hkimscil | multicollinearity [2023/05/22 07:57] (current) – [Testing with correlation matrix] hkimscil | ||
---|---|---|---|
Line 7: | Line 7: | ||
see [[: | see [[: | ||
- | ====== Testing with correlation matrix ====== | + | ====== Testing |
< | < | ||
options(digits = 4) | options(digits = 4) | ||
Line 91: | Line 91: | ||
> | > | ||
</ | </ | ||
+ | |||
+ | R 에서는 | ||
+ | < | ||
+ | m.a <- lm(FGPA ~ SATV+HSGPA, data = scholar) | ||
+ | summary(m.a) | ||
+ | # install.packages(" | ||
+ | # library(olsrr) | ||
+ | ols_vif_tol(m.a) | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | > m.a <- lm(FGPA ~ SATV+HSGPA, data = scholar) | ||
+ | > summary(m.a) | ||
+ | |||
+ | Call: | ||
+ | lm(formula = FGPA ~ SATV + HSGPA, data = scholar) | ||
+ | |||
+ | Residuals: | ||
+ | Min 1Q Median | ||
+ | -0.2431 -0.1125 -0.0286 | ||
+ | |||
+ | Coefficients: | ||
+ | Estimate Std. Error t value Pr(> | ||
+ | (Intercept) 0.233102 | ||
+ | SATV 0.000151 | ||
+ | HSGPA | ||
+ | --- | ||
+ | Signif. codes: | ||
+ | 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 | ||
+ | |||
+ | Residual standard error: 0.192 on 7 degrees of freedom | ||
+ | Multiple R-squared: | ||
+ | F-statistic: | ||
+ | |||
+ | > # install.packages(" | ||
+ | > # library(olsrr) | ||
+ | > ols_vif_tol(m.a) | ||
+ | Variables Tolerance | ||
+ | 1 SATV 0.2352 4.251 | ||
+ | 2 | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ====== using condition index ====== | ||
+ | < | ||
+ | ols_eigen_cindex(m.a) | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | > ols_eigen_cindex(m.a) | ||
+ | Eigenvalue Condition Index intercept | ||
+ | 1 | ||
+ | 2 | ||
+ | 3 | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
{{tag> | {{tag> |
multicollinearity.1684293010.txt.gz · Last modified: 2023/05/17 12:10 by hkimscil