This example is taken from Example 91.3 in ChapterĀ 91: The PRINCOMP Procedure. The following statements create a SAS data set that contains job performance ratings of police officers:
options validvarname=any; data Jobratings; input ('Communication Skills'n 'Problem Solving'n 'Learning Ability'n 'Judgment Under Pressure'n 'Observational Skills'n 'Willingness to Confront Problems'n 'Interest in People'n 'Interpersonal Sensitivity'n 'Desire for Self-Improvement'n 'Appearance'n 'Dependability'n 'Physical Ability'n 'Integrity'n 'Overall Rating'n) (1.); datalines; 26838853879867 74758876857667 ... more lines ... ;
The following statements run PROC PRINCOMP:
proc princomp data=Jobratings(drop='Overall Rating'n) n=2 plots=(Matrix PatternProfile); run;
The plots are requested by the PLOTS=(MATRIX PATTERNPROFILE) option. The results, shown in FigureĀ 21.11, contain the default scree and variance-explained plots, along with a scatter plot matrix of component scores and a pattern profile plot.
Figure 21.11: Principal Component Analysis