<?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: select variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/select-variables/m-p/899318#M83014</link>
    <description>&lt;P&gt;So, you have the correlation matrix in a SAS data set. I assume that it was created by PROC CORR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set corr(where=(_type_='CORR'));
    array x _numeric_;
    do i=1 to dim(x);
        if x(i)&amp;lt;0.8 then x(i)=.;
     end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then (if you want) delete rows that are all missings, and delete all columns that are all missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, it is always helpful if the data you show us could be real and is representative of the actual problem in all relevant ways, even if the data itself if fake. This data violates the conditions of what a correlation matrix should look like. How is the correlation of A with A equal to 0.3? How is the correlation A with C equal to 0.8 and the correlation of C with A equal to 0.1? Perhaps your data set isn't really a correlation matrix? Perhaps it was created via some other method, which would be helpful to know. In fact, I think you should tell us how this matrix was created.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2023 20:02:55 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-10-19T20:02:55Z</dc:date>
    <item>
      <title>select variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/select-variables/m-p/899316#M83013</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in correlation matrix resulting from the output of proc corr , I want to select all variables having correlation more than 0.8.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A&amp;nbsp; &amp;nbsp;B&amp;nbsp; &amp;nbsp;C&lt;/P&gt;
&lt;P&gt;A 0.3 0.6 0.8&lt;/P&gt;
&lt;P&gt;B 0.2&amp;nbsp; 0.8&amp;nbsp; 0.9&lt;/P&gt;
&lt;P&gt;C 0.1 0.6 0.4&lt;/P&gt;
&lt;P&gt;want&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&amp;nbsp; &amp;nbsp;C&lt;/P&gt;
&lt;P&gt;A&amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; 0.8&lt;/P&gt;
&lt;P&gt;B&amp;nbsp; &amp;nbsp; 0.8&amp;nbsp; 0.9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 19:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/select-variables/m-p/899316#M83013</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2023-10-19T19:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: select variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/select-variables/m-p/899318#M83014</link>
      <description>&lt;P&gt;So, you have the correlation matrix in a SAS data set. I assume that it was created by PROC CORR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set corr(where=(_type_='CORR'));
    array x _numeric_;
    do i=1 to dim(x);
        if x(i)&amp;lt;0.8 then x(i)=.;
     end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then (if you want) delete rows that are all missings, and delete all columns that are all missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, it is always helpful if the data you show us could be real and is representative of the actual problem in all relevant ways, even if the data itself if fake. This data violates the conditions of what a correlation matrix should look like. How is the correlation of A with A equal to 0.3? How is the correlation A with C equal to 0.8 and the correlation of C with A equal to 0.1? Perhaps your data set isn't really a correlation matrix? Perhaps it was created via some other method, which would be helpful to know. In fact, I think you should tell us how this matrix was created.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 20:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/select-variables/m-p/899318#M83014</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-19T20:02:55Z</dc:date>
    </item>
  </channel>
</rss>

