We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.
Collinearity: Principal Components와 Eigenvalues
Author
Heeyoung Kim
Published
April 4, 2024
Principal Components
Formula
Principal Components(PC)는 원 자료의 변수를 표준화하여 얻은 서로 직교(orthogonal)하는 성분들입니다. 변수들 간에 다중공선성이 존재할 경우, 아래와 같은 (거의) 선형결합 관계가 발생합니다.
이를 이용하여 주성분분석을 수행할 수 있으며, 고차원 자료에서 차원을 축소하거나 다중공선성 문제를 완화하는 데 활용됩니다.
Example
아래 예제는 IMPORT 데이터(파일 P241.txt)를 사용한 주성분분석 예시입니다. 먼저, 상관계수를 구하고 고유값(eigenvalues)과 고유벡터(eigenvectors)를 살펴봅니다.
# eigen() 함수를 이용해 고유값과 고유벡터 추출eigenvectors <-eigen(corr)$vectorseigenvalues <-eigen(corr)$values# 행 이름 지정rownames(eigenvectors) <-rownames(corr)eigenvectors