factor_analysis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
factor_analysis [2021/11/18 16:32] – [Interpretation of factor loading and the rotation method] hkimscil | factor_analysis [2023/11/06 02:53] (current) – [E.g. 2] hkimscil | ||
---|---|---|---|
Line 185: | Line 185: | ||
| Y3 | $S_{31}$ | | Y3 | $S_{31}$ | ||
- | 실제 데이터에서 구한 variance covariance table은 아래와 같다. | + | 실제 데이터에서 구한 variance covariance table은 아래와 같다((편의상 여기 분산값은 n으로 (n-1이 아닌) 나눠 준 것)). |
| Variable | | Variable | ||
Line 197: | Line 197: | ||
## 예를 들어 | ## 예를 들어 | ||
fd <- read.csv(" | fd <- read.csv(" | ||
+ | fd <- fd[, -1] # 처음 id 컬럼 지우기 | ||
cov(fd) | cov(fd) | ||
Line 332: | Line 333: | ||
각주 1) -> finance = 수학능력 = F1 | 각주 1) -> finance = 수학능력 = F1 | ||
각주 2), 3) -> marketing, policy = 언어능력 = F2 | 각주 2), 3) -> marketing, policy = 언어능력 = F2 | ||
- | 각주 | + | 각주 |
< | < | ||
Line 457: | Line 458: | ||
| Economics | | Economics | ||
| Total | | Total | ||
+ | ===== Specificity ===== | ||
+ | | Variable | ||
+ | | Climate | ||
+ | | Housing | ||
+ | | Health | ||
+ | | Crime | ||
+ | | Transportation | ||
+ | | Education | ||
+ | | Arts | 0.754 | | | ||
+ | | Recreation | ||
+ | | Economics | ||
+ | | Total | ||
====== Methods (functions) in R ====== | ====== Methods (functions) in R ====== | ||
Line 468: | Line 481: | ||
< | < | ||
- | mydata | + | my.data |
# if data as NAs, it is better to omit them: | # if data as NAs, it is better to omit them: | ||
my.data <- na.omit(my.data) | my.data <- na.omit(my.data) | ||
Line 1111: | Line 1124: | ||
Cumulative Proportion 0.25 0.43 0.60 0.75 0.88 1.00 | Cumulative Proportion 0.25 0.43 0.60 0.75 0.88 1.00 | ||
- | SS total = 32.14286 | ||
SS loadings = eigenvalues for each factor (MR1, . . . ) | SS loadings = eigenvalues for each factor (MR1, . . . ) | ||
</ | </ | ||
+ | |||
SS loadings | SS loadings | ||
- | SS total <fc # | + | < |
- | $\frac {4.5}{32.14286} = 0.14$ | + | # SS total = 각 변인들의 분산을 (variation) 1 로 보았을 때 SS loading 값을 구한 것이므로 |
+ | # SS total 값은 각 변인들의 숫자만큼이 된다. 이 경우는 총 32개 문항이 존재하므로 32가 SS total | ||
+ | ss.tot = 32 | ||
+ | </ | ||
+ | |||
+ | SS total <fc # | ||
+ | $\frac {4.5}{32} = 0.14$ | ||
Proportion Var <fc # | Proportion Var <fc # | ||
eigenvalues for factor 1 | eigenvalues for factor 1 | ||
| SS loadings \\ eigenvalue | | SS loadings \\ eigenvalue | ||
- | | | $\frac {4.5}{32.14286}$ | $\frac {3.19}{32.14286}$ | $\frac {2.97}{32.14286}$ | $\frac {2.55}{32.14286}$ | $\frac {2.31}{32.14286}$ | $\frac {2.16}{32.14286}$ | | + | | | $\frac {4.5}{32}$ |
| Proportion Var | 0.14 | 0.10 | 0.09 | 0.08 | 0.07 | 0.07 | | | Proportion Var | 0.14 | 0.10 | 0.09 | 0.08 | 0.07 | 0.07 | | ||
| Cumulative Var | 0.14 | 0.24 | 0.33 | 0.41 | 0.48 | 0.55 | | | Cumulative Var | 0.14 | 0.24 | 0.33 | 0.41 | 0.48 | 0.55 | | ||
Line 1133: | Line 1152: | ||
[1] 4.500258 | [1] 4.500258 | ||
</ | </ | ||
- | |||
- | What is the total variance of all variables? | ||
- | \begin{eqnarray*} | ||
- | 4.5 : 0.14 =& x : 1.00 \\ | ||
- | x =& 4.5 / .14 \\ | ||
- | =& 32.14286 | ||
- | \end{eqnarray*} | ||
< | < | ||
- | > (4.50+3.19+2.97+2.55+2.31+2.16)/ | + | > (4.50+3.19+2.97+2.55+2.31+2.16)/ |
- | [1] 0.5500444 | + | [1] 0.5525 |
+ | |||
+ | > or | ||
+ | sum(d.fa.so.loadings^2)/ | ||
</ | </ | ||
===== specific variance ===== | ===== specific variance ===== | ||
Line 1549: | Line 1564: | ||
====== Reference ====== | ====== Reference ====== | ||
{{: | {{: | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | see exploratory factor analysis :: {{youtube> |
factor_analysis.1637220751.txt.gz · Last modified: 2021/11/18 16:32 by hkimscil