<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I make PCA dots be identified? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/398499#M13645</link>
    <description>&lt;P&gt;I'm going to assume that you are most interested in labeling the extreme observations. The easiest way to control the labels is to use the OUT= option on the PROC PRINCOMP statement to write the PC scores to a data set. Then use some distance criterion to identify the extreme observations. You can then create a label variable that is blank for non-extreme observations and non-blank for extreme observations. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following&amp;nbsp;example uses &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_princomp_gettingstarted.htm" target="_self"&gt;the data from the Getting Started example in the doc&lt;/A&gt;. It creates a new character variable that is non-blank for observations that are more than 2.5 units away from the origin in the coordinates of the first two PCs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let OutlierDist = 2.5;
data Outliers;
set Crime_Components;
dist = Euclid(Prin1, Prin2);
ObsLabel = ifc(dist &amp;gt; &amp;amp;OutlierDist, State, " ");
run;

proc sgplot data=Outliers;
scatter x=Prin1 y=Prin2 / datalabel=ObsLabel;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="j.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15389i7F82D9FDF77583DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="j.png" alt="j.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2017 12:28:23 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-09-25T12:28:23Z</dc:date>
    <item>
      <title>How do I make PCA dots be identified?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/397974#M13631</link>
      <description>&lt;P&gt;I have been doing PCA in SAS University Edition recently and now, I have got 800 observations plotted on the graph. My problem is that each individual dot could not be distinguised due to the large number of samples that we have. Is there a way for me to make the dots and labels smaller for overlap avoidance? Or, can we fish out which samples we are interested in through gating?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 02:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/397974#M13631</guid>
      <dc:creator>jcvaldoz</dc:creator>
      <dc:date>2017-09-22T02:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make PCA dots be identified?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/397995#M13632</link>
      <description>&lt;P&gt;What does your code look like?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 06:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/397995#M13632</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-09-22T06:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make PCA dots be identified?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/397996#M13633</link>
      <description>I just used the preset for princom and just changed the plot to "plot=all". There is nothing much in the code; just the principal component command and the show all plots command.</description>
      <pubDate>Fri, 22 Sep 2017 06:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/397996#M13633</guid>
      <dc:creator>jcvaldoz</dc:creator>
      <dc:date>2017-09-22T06:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make PCA dots be identified?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/398499#M13645</link>
      <description>&lt;P&gt;I'm going to assume that you are most interested in labeling the extreme observations. The easiest way to control the labels is to use the OUT= option on the PROC PRINCOMP statement to write the PC scores to a data set. Then use some distance criterion to identify the extreme observations. You can then create a label variable that is blank for non-extreme observations and non-blank for extreme observations. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following&amp;nbsp;example uses &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_princomp_gettingstarted.htm" target="_self"&gt;the data from the Getting Started example in the doc&lt;/A&gt;. It creates a new character variable that is non-blank for observations that are more than 2.5 units away from the origin in the coordinates of the first two PCs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let OutlierDist = 2.5;
data Outliers;
set Crime_Components;
dist = Euclid(Prin1, Prin2);
ObsLabel = ifc(dist &amp;gt; &amp;amp;OutlierDist, State, " ");
run;

proc sgplot data=Outliers;
scatter x=Prin1 y=Prin2 / datalabel=ObsLabel;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="j.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15389i7F82D9FDF77583DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="j.png" alt="j.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 12:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-make-PCA-dots-be-identified/m-p/398499#M13645</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-09-25T12:28:23Z</dc:date>
    </item>
  </channel>
</rss>

