Previous Page | Next Page

Statistical Graphics Using ODS

Principal Component Analysis Plots with PROC PRINCOMP

This example is taken from Example 69.3 of Chapter 69, The PRINCOMP Procedure. The following statements create a SAS data set that contains ratings of job performance 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
             'Physical Ability'n
             'Overall Rating'n) (1.);
   ... more lines ...   


The following statements set the output style to RTF and run PROC PRINCOMP:

   ods listing style=rtf;
   ods graphics on;
   proc princomp data=Jobratings(drop='Overall Rating'n) n=2
                 plots=(Matrix PatternProfile);

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 Components Using the RTF Style
Principal Components Using the RTF StylePrincipal Components Using the RTF Style, continuedPrincipal Components Using the RTF Style, continued

Previous Page | Next Page | Top of Page