Hi: If you are running SAS 9.2 or higher, you can modify the PRINCOMP code directly to create an ellipse from your PRINCOMP procedure using the PLOTS= option. Otherwise, as Doc suggested, if you want to make a dataset and then plot the points yourself, I find SGPLOT to be the most straightforward -- you only need a SCATTER statement and an ELLIPSE statement. Of course, with the PRINCOMP "direct" approach, you only need the PLOTS= option. I believe that either one involves modifying the code a bit. The attached program makes some fake data then. shows both approaches. cynthia data testdata; input grpvar $3. (x1-x14) (1.); return; datalines; s1 26838853879867 s2 74758876857667 s1 56757863775875 s2 67869777988997 s3 99997798878888 s3 89897899888799 s1 89999889899798 s2 87794798468886 s3 35652335143113 s1 89888879576867 s2 76557899446397 s3 97889998898989 s1 76766677598888 s2 99899899899899 s3 76656399567486 ; run; ods _all_ close; ods listing close; ods html path='c:\temp' (url=none) file='something.html' style=egdefault; ods graphics on; PROC PRINCOMP DATA=testdata OUT=PCSCORES COVARIANCE PLOTS(NCOMP=2)=(SCORE(ellipse)); title '1)PRINCOMP direct approach with ODS GRAPHICS'; VAR X1 X2 X3 X4 X5 X6 X7 X8 X9 ; RUN; ods graphics off; proc sgplot data=pcscores; title '2) Use SGPLOT with SCATTER and ELLIPSE'; scatter x=prin1 y=prin2/group=grpvar; ellipse x=prin1 y=prin2; run; ods _all_ close;
... View more