본문 바로가기
통계학

요인분석 3

by 써머23 2025. 6. 1.
728x90

 

공분산은 요인에 의해 결정된다

Cov(X) = LL' + Ψ 이므로(프사이는 대각행렬)

-------------------------------

비유일성의 문제

-------------------------

직교회전과 비직교회전

 

----------------------------

----------------------

 

 

 

 

PCA용.xlsx
0.02MB

 

 

# 필요한 패키지
library(readxl)
library(psych)

# 데이터 불러오기
data <- read_excel("d:/mydata/PCA용.xlsx", sheet = "Sheet1")

# 필요한 변수 선택 및 결측 제거
vars <- c("컨택률", "스윙률", "타구속도", "발사각도")
df <- na.omit(data[vars])

# 표준화
df_scaled <- scale(df)

# 요인 수 결정: 2개 요인 지정
nfactors <- 2

# 요인 분석 - 직교 회전 (varimax)
fa_orth <- fa(df_scaled, nfactors = nfactors, rotate = "varimax", fm = "ml")  # fm = maximum likelihood

# 요인 분석 - 비직교 회전 (promax)
fa_oblq <- fa(df_scaled, nfactors = nfactors, rotate = "promax", fm = "ml")

# 결과 출력
cat("\n▶ 요인 분석 결과: 직교 회전 (Varimax)\n")
print(fa_orth)

cat("\n▶ 요인 분석 결과: 비직교 회전 (Promax)\n")
print(fa_oblq)

728x90

'통계학' 카테고리의 다른 글

요인분석 5  (0) 2025.06.02
요인분석 4  (0) 2025.06.02
요인분석 2  (0) 2025.05.29
요인분석 1  (0) 2025.05.29
등상관 구조에 대한 검정 및 구형성  (0) 2025.05.28