Chapter 7 Principal Component Analysis

Generating Example Data

Principal Components

##          x1        x2
## x1 26.30955 10.674828
## x2 10.67483  4.491807
## eigen() decomposition
## $values
## [1] 30.6635603  0.1378015
## 
## $vectors
##            [,1]       [,2]
## [1,] -0.9259407  0.3776689
## [2,] -0.3776689 -0.9259407

Checking Orthonormality

Rotating Data with Principal Components

##              v1           v2
## v1 3.066356e+01 9.524201e-16
## v2 9.524201e-16 1.378015e-01

##              x1         x2
## [1,] -4.0479947 -2.0162488
## [2,] -0.4316620  0.2059447
## [3,]  3.0948597  1.0908917
## [4,] -3.5970454 -1.2360385
## [5,]  3.6123526  1.3130242
## [6,]  0.2515032 -0.7869887

##               v1         v2
## [1,]  4.50967753  0.3381250
## [2,]  0.32191453 -0.3537179
## [3,] -3.27765247  0.1587313
## [4,]  3.79746409 -0.2139939
## [5,] -3.84071274  0.1484908
## [6,]  0.06434412  0.8236898