The PRINCOMP Procedure

Example 92.3 Analyzing Job Ratings of Police Officers

(View the complete code for this example.)

This example uses the PRINCOMP procedure to analyze job performance. Police officers were rated by their supervisors in 14 categories as part of standard police department administrative procedure.

The following statements create the Jobratings data set:

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;
   datalines;
2 6 8 3 8 8 5 3 8 7 9 8 6 7 7 4 7 5 8 8 7 6 8 5 7 6 6 7 5 6 7 5 7 8 6 3 7 7 5
8 7 5 6 7 8 6 9 7 7 7 9 8 8 9 9 7 9 9 9 9 7 7 9 8 8 7 8 8 8 8 8 9 8 9 7 8 9 9
8 8 8 7 9 9 8 9 9 9 9 8 8 9 8 9 9 7 9 8 8 7 7 9 4 7 9 8 4 6 8 8 8 6 3 5 6 5 2

   ... more lines ...   

7 8 9 9 7 9 9 7 9 9 9 9 8 9 9 8 9 9 8 9 9 8 9 9 7 6 6 5 6 3 9 9 5 6 7 4 8 6
;

The Jobratings data set contains 14 variables. Each variable contains the job ratings, which use a scale measurement from 1 to 10 (1=fail to comply, 10=exceptional). The last variable, Overall Rating, contains a score as an overall index of how each officer performs.

The following statements request a principal component analysis of the Jobratings data set, output the scores to the Scores data set (OUT= Scores), and produce default plots. Note that the variable Overall Rating is excluded from the analysis.

ods graphics on;

proc princomp data=Jobratings(drop='Overall Rating'n);
run;

Output 92.3.1 and Output 92.3.2 display the PROC PRINCOMP output, beginning with simple statistics and then the correlation matrix. By default, PROC PRINCOMP computes principal components from the correlation matrix, so the total variance is equal to the number of variables, 13. In this example, it would also be reasonable to use the COV option, which would cause variables that have a high variance (such as Dependability) to influence the results more than variables that have a low variance (such as Learning Ability). If you used the COV option, scores would be computed from centered rather than standardized variables.

Output 92.3.1: Simple Statistics and Correlation Matrix from Using PROC PRINCOMP

The PRINCOMP Procedure

Observations37
Variables13

Simple Statistics
 Communication SkillsProblem SolvingLearning AbilityJudgment Under PressureObservational SkillsWillingness to Confront
Problems
Interest in PeopleInterpersonal SensitivityDesire for Self-ImprovementAppearanceDependabilityPhysical AbilityIntegrity
Mean6.5675675686.6756756766.8918918926.3783783787.0810810816.7567567576.6756756766.5405405417.0270270277.1351351357.0270270277.1621621627.081081081
StD1.8788374141.7488735111.6961358662.2527927281.8162595632.1266223271.8716311082.2185404941.7076053161.4368592711.4997497291.3439889531.460182226

Correlation Matrix
 Communication
Skills
Problem SolvingLearning AbilityJudgment Under
Pressure
Observational
Skills
Willingness
to Confront
Problems
Interest in
People
Interpersonal
Sensitivity
Desire for
Self-Improvement
AppearanceDependabilityPhysical AbilityIntegrity
Communication Skills1.00000.72540.36850.61070.43380.57080.46460.29750.0211-.0086-.2619-.1145-.2096
Problem Solving0.72541.00000.67150.68770.62070.65040.38280.31130.18900.1064-.0389-.0361-.1852
Learning Ability0.36850.67151.00000.51260.76030.35450.10240.31120.30790.18850.01210.0932-.1085
Judgment Under Pressure0.61070.68770.51261.00000.57610.62270.56350.49150.14890.1382-.1347-.1217-.1025
Observational Skills0.43380.62070.76030.57611.00000.46550.24490.49210.41130.0915-.16400.0741-.0549
Willingness to Confront Problems0.57080.65040.35450.62270.46551.00000.47510.21700.19310.11110.22860.1114-.1813
Interest in People0.46460.38280.10240.56350.24490.47511.00000.56520.37650.27500.12200.02150.1115
Interpersonal Sensitivity0.29750.31130.31120.49150.49210.21700.56521.00000.54600.41210.07900.17470.1747
Desire for Self-Improvement0.02110.18900.30790.14890.41130.19310.37650.54601.00000.56450.21660.32480.3667
Appearance-.00860.10640.18850.13820.09150.11110.27500.41210.56451.00000.55250.34790.4183
Dependability-.2619-.03890.0121-.1347-.16400.22860.12200.07900.21660.55251.00000.56280.3415
Physical Ability-.1145-.03610.0932-.12170.07410.11140.02150.17470.32480.34790.56281.00000.5027
Integrity-.2096-.1852-.1085-.1025-.0549-.18130.11150.17470.36670.41830.34150.50271.0000


Output 92.3.2 displays the eigenvalues. The first principal component accounts for about 50% of the total variance, the second principal component accounts for about 13.6%, and the third principal component accounts for about 7.7%. Note that the eigenvalues sum to the total variance. The eigenvalues indicate that three to five components provide a good summary of the data: three components account for about 71.7% of the total variance, and five components account for about 82.7%. Subsequent components account for less than 5% each.

Output 92.3.2: Eigenvalues and Eigenvectors from Using PROC PRINCOMP

Eigenvalues of the Correlation Matrix
 EigenvalueDifferenceProportionCumulative
14.694686871.818996830.36110.3611
22.875690031.671002770.22120.5823
31.204687270.031189350.09270.6750
41.173497910.458463220.09030.7653
50.715034700.157135830.05500.8203
60.557898870.092690820.04290.8632
70.465208050.041187630.03580.8990
80.424020410.134545520.03260.9316
90.289474890.068693110.02230.9539
100.220781780.032217690.01700.9708
110.188564100.066201080.01450.9853
120.122363020.054270920.00940.9948
130.06809210 0.00521.0000

Eigenvectors
 Prin1Prin2Prin3Prin4Prin5Prin6Prin7Prin8Prin9Prin10Prin11Prin12Prin13
Communication Skills0.323548-.2367300.2067270.0926550.2931380.260352-.215988-.550645-.0506480.1070020.2625090.3412320.291574
Problem Solving0.383857-.160898-.0912240.2127510.0252580.252518-.140816-.1043920.2831040.221940-.548010-.492803-.073999
Learning Ability0.322899-.050464-.5535650.056656-.1383930.1684050.1500620.0555180.391053-.2233990.1323380.442471-.307096
Judgment Under Pressure0.379958-.1428210.155157-.0254670.0436120.1752690.3610450.391055-.315796-.392714-.2860210.1112250.382730
Observational Skills0.359246-.067434-.424397-.1481910.093417-.2210050.0229440.177808-.1414010.2253260.502509-.4166690.278776
Willingness to Confront Problems0.333754-.0642850.1833380.459764-.024447-.304704-.2470940.259896-.3876650.1585520.0476110.168464-.459746
Interest in People0.2961600.0821870.575827-.1402260.023973-.159653-.0154760.1316820.540942-.2772060.299254-.197252-.112818
Interpersonal Sensitivity0.3026930.1808100.119231-.432281-.047507-.2386100.501550-.303435-.0977270.393688-.1969060.137833-.222427
Desire for Self-Improvement0.2257950.344251-.123236-.333516-.174557-.266896-.6218750.0208420.018350-.105222-.2933490.2196620.263644
Appearance0.1583410.4253290.052469-.022665-.4417290.494677-.051864-.204081-.350816-.1867930.226289-.256802-.177399
Dependability0.0255970.4273370.0790190.520679-.289013-.0440470.2215200.0797620.2503260.3366890.0493000.1467110.445532
Physical Ability0.0529800.418985-.1856870.3125550.486621-.2996410.145579-.340453-.072184-.432711-.090520-.154868-.034075
Integrity-.0061720.4352250.015874-.1479050.5781860.421421-.0871260.3961790.0301300.2843510.0214830.113790-.129601


PROC PRINCOMP produces the scree plot as shown in Output 92.3.3 by default when ODS Graphics is enabled. You can obtain more plots by specifying the PLOTS= option in the PROC PRINCOMP statement.

The scree plot on the left shows that the eigenvalue of the first component is approximately 6.5 and the eigenvalue of the second component is largely decreased to under 2.0. The variance explained plot on the right shows that the first four principal components account for nearly 80% of the total variance.

Output 92.3.3: Scree Plot from Using PROC PRINCOMP

 Scree Plot from Using PROC PRINCOMP


The first component reflects overall performance, because the first eigenvector shows approximately equal loadings on all variables. The second eigenvector has high positive loadings on the variables Observational Skills and Willingness to Confront Problems but even higher negative loadings on the variables Interest in People and Interpersonal Sensitivity. This component seems to reflect the ability to take action, but it also reflects a lack of interpersonal skills. The third eigenvector has a very high positive loading on the variable Physical Ability and high negative loadings on the variables Problem Solving and Learning Ability. This component seems to reflect physical strength, but it also shows poor learning and problem-solving skills.

In short, the three components represent the following:

First component:

overall performance

Second component:

smartness, toughness, and introversion

Third component:

superior strength and average intellect

PROC PRINCOMP also produces other plots besides the scree plot, that help interpret the results. The following statements request plots from the PRINCOMP procedure:

proc princomp data=Jobratings(drop='Overall Rating'n)
              n=5 plots(ncomp=3)=all;
run;

The N=5 option sets the number of principal components to five. The option PLOTS(NCOMP=3)=ALL produces all plots but limits to three the number of components that are displayed in the component pattern plots and the component score plots.

Output 92.3.4 shows a matrix plot of component scores for the first five principal components. The histogram of each component is displayed in the diagonal element of the matrix. The histograms indicate that the first principal component is skewed to the left and the second principal component is slightly skewed to the right.

Output 92.3.4: Matrix Plot of Component Scores

 Matrix Plot of Component Scores


The pairwise component pattern plots are shown in Output 92.3.5 through Output 92.3.7. The pattern plots show the following:

  • All variables positively and evenly correlate with the first principal component (Output 92.3.5 and Output 92.3.6).

  • The variables Observational Skills and Willingness to Confront Problems correlate highly with the second component, and the variables Interest in People and Interpersonal Sensitivity correlate highly but negatively with the second component (Output 92.3.5).

  • The variable Physical Ability correlates highly with the third component, and the variables Problem Solving and Learning Ability correlate highly but negatively with the third component (Output 92.3.6).

  • The variables Observational Skills, Willingness to Confront Problems, Interest in People, and Interpersonal Sensitivity correlate highly (either positively or negatively) with the second component, but all these variables have very low correlations with the third component; the variables Physical Ability and Problem Solving correlate highly (either positively or negatively) with the third component, but both variables have very low correlations with the second component (Output 92.3.7).

Output 92.3.5: Pattern Plot of Component 2 by Component 1

 Pattern Plot of Component 2 by Component 1


Output 92.3.6: Pattern Plot of Component 3 by Component 1

 Pattern Plot of Component 3 by Component 1


Output 92.3.7: Pattern Plot of Component 3 by Component 2

 Pattern Plot of Component 3 by Component 2


Output 92.3.8 shows a component pattern profile. As is shown in the pattern plots, the nearly horizontal profile from the first component indicates that the first component is mostly correlated evenly across all variables.

Output 92.3.8: Component Pattern Profile Plot from Using PROC PRINCOMP

 Component Pattern Profile Plot from Using PROC PRINCOMP


Output 92.3.9 through Output 92.3.11 display the pairwise component score plots. Observation numbers are used as the plotting symbol.

Output 92.3.9 shows a scatter plot of the first and second components. Observations 4 and 31 seem like outliers on the first component. Observations 22 and 30 can be potential outliers on the second component.

Output 92.3.9: Component 2 versus Component 1

 Component 2 versus Component 1


Output 92.3.10 shows a scatter plot of the first and third components. Observations 4 and 31 seem like outliers on the first component.

Output 92.3.10: Component 3 versus Component 1

 Component 3 versus Component 1


Output 92.3.11 shows a scatter plot of the second and third components. Observations 22 and 30 can be potential outliers on the second component.

Output 92.3.11: Component 3 versus Component 2

 Component 3 versus Component 2


Output 92.3.12 shows a scatter plot of the second and third components, displaying the first component in color. Color interpolation ranges from red (minimum) to blue (middle) to green (maximum).

Output 92.3.12: Component 3 versus Component 2, Painted by Component 1

 Component 3 versus Component 2, Painted by Component 1