STAT Principal Components Analysis

# 0000 prin3 0861998 479364 0164835

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ponent with the three original variables X1, X2, and X3 First eigenvalue λ 1 2.2294570 Final Communality Estimates: Total = 2.229457 x1 x2 x3 0.75291032 0.92855392 0.54799278 SAS code for Principal Components Analysis: OPTIONS LINESIZE=72 NODATE PAGENO=1; DATA stuff; INPUT x1 x2 x3; LABEL x1='Random Variable 1' x2='Random Variable 2' x3='Random Variable 3'; CARDS; 1.0 6.0 9.0 4.0 12.0 10.0 3.0 12.0 15.0 4.0 10.0 12.0 ; PROC PRINCOMP DATA=stuff OUT=pcstuff N=3 COV; VAR x1 x2 x3; RUN; PROC CORR DATA=pcstuff; VAR x1 x2 x3; WITH prin1 prin2 prin3; RUN; PROC FACTOR DATA=stuff SCREE COV; VAR x1 x2 x3; RUN; Note that here we use SAS to derive the covariance matrix based principal components! SAS output for Principal Components Analysis: The PRINCOMP Procedure Observations 4 Variables 3 Mean StD x1 x2 x3 Simple Statistics x1 x2 3.000000000 10.00000000 1.414213562 2.82842712 Random Variable 1 Random Variable 2 Random Variable 3 Covariance Matrix x1 x2 2.000000000 3.333333333 3.333333333 8.000000000 1.333333333 4.666666667 Total Variance Random Variable 1 Random Variable 2 Random Variable 3 Eigenvectors Prin1 0.291038 0.734249 0.613331 x3 1.333333333 4.666666667 7.000000000 17 Eigenvalues of the Covariance Matrix Eigenvalue Difference Proportion 13.2193960 9.8400643 0.7776 3.3793317 2.9780594 0.1988 0.4012723 0.0236 1 2 3 x1 x2 x3 x3 11.50000000 2.64575131 Prin2 0.415039 0.480716 -.772434 Cumulative 0.7776 0.9764 1.0000 Prin3 0.861998 -.479364 0.164835 SAS output for Correlation Matrix – Original Random Variables vs. Principal Components: The CORR Procedure 3 With Variables: 3 Variables: Variable Prin1 Prin2 Prin3 x1 x2 x3 N 4 4 4 4 4 4 Prin1 x1 Prin2 x2 Simple Statistics Mean Std Dev 0 3.63585 0 1.83830 0 0.63346 3.00000 1.41421 10.00000 2.82843 11.50000 2.64575 Prin3 x3 Sum 0 0 0 12.00000 40.00000 46.00000 Minimum -5.05240 -1.74209 -0.38181 1.00000 6.00000 9.00000 Pearson Correlation Coefficients, N = 4 Prob &gt; |r| under H0: Rho=0 x1 x2 x3 Prin1 0.74824 0.2518 0.94385 0.0561 0.84285 0.1571 Prin2 0.53950 0.4605 0.31243 0.6876 -0.53670 0.4633 Prin3 0.38611 0.6139 -0.10736 0.8926 0.03947 0.9605 Maximum 3.61516 2.53512 0.94442 4.00000 12.00000 15.00000 SAS output for Factor Analysis PRINCIPAL COMPONENTS ANALYSIS FOR QA 610 SPRING QUARTER 2001 Using PROC FACTOR to obtain a Scree Plot for Principal Components Analysis The FACTOR Procedure Initial Factor Method: Principal Components Prior Communality Estimates: ONE Eigenvalues of the Covariance Matrix: Total = 17 Average = 5.66666667 Eigenvalue 1 2 3 Difference Proportion Cumulative 13.2193960 3.3793317 0.4012723 9.8400643 2.9780594 0.7776 0.1988 0.0236 0.7776 0.9764 1.0000 1 factor will be retained by the MINEIGEN criterion. Note that this is consistent with the results from PCA SAS output for Factor Analysis The FACTOR Procedure Initial Factor Method: Principal Components Scree Plot of Eigenvalues ‚ ‚ ‚ 14 ˆ ‚ ‚ 1 ‚ ‚ 12 ˆ ‚ ‚ ‚ 10 ˆ ‚ E ‚ i ‚ g ‚ e 8ˆ n ‚ v ‚ a ‚ l ‚ u 6ˆ e ‚ s ‚ ‚ ‚ 4ˆ ‚ ‚ 2 ‚ ‚ 2ˆ ‚ ‚ ‚ ‚ 3 0ˆ ‚ ‚ ‚ Šƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒ...
View Full Document

Ask a homework question - tutors are online