<?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: using a specific matrix as input for cluster analysis in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489326#M4328</link>
    <description>&lt;P&gt;Hi lanWakeling,&lt;/P&gt;
&lt;P&gt;Thanks for your response,&lt;/P&gt;
&lt;P&gt;I added the statements you mentioned. Now I have the matrix but it does not have the candidates id numbers in rows and columns. I attached the output.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 23 Aug 2018 16:46:34 GMT</pubDate>
    <dc:creator>dustychair</dc:creator>
    <dc:date>2018-08-23T16:46:34Z</dc:date>
    <item>
      <title>using a specific matrix as input for cluster analysis</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489116#M4326</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I have a matrix created based on raw data. I want to use this matrix as input for cluster analysis. Can anyone help me to define that matrix as input? Here is the code I use. I tried that code but it did not work. I don't know what I'm missing. I also attached raw data I used.&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data tr;&lt;BR /&gt;infile 'C:\coll_gen\N100\GROUP10\COMP40\PHI25\gbt\RESULTS-SIG1.OUT';&lt;BR /&gt;input CAND_1$ CAND_2$ ID_1 ID_2 THETA_1 THETA_2 MATCHES RT_PROB FLAG ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc iml;&lt;BR /&gt;use tr nobs nobs;&lt;BR /&gt;read all var{CAND_1 CAND_2 RT_PROB};&lt;BR /&gt;close;&lt;/P&gt;
&lt;P&gt;levels=unique(CAND_1||CAND_2);&lt;BR /&gt;matrix1=j(ncol(levels),ncol(levels),.);&lt;BR /&gt;mattrib matrix1 r=((levels)) c=((levels)) label='' ;&lt;BR /&gt;row=(CAND_1);&lt;BR /&gt;col=(CAND_2);&lt;BR /&gt;do i=1 to nobs;&lt;BR /&gt;r=row[i];c=col[i];p=RT_PROB[i];&lt;BR /&gt;matrix1[r,c]=p;&lt;BR /&gt;end;&lt;BR /&gt;print matrix1;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on;&lt;/P&gt;
&lt;P&gt;proc cluster data=matrix1 method=ward ccc pseudo out=tree;&lt;BR /&gt;var RT_PROB;&lt;BR /&gt;id CAND_1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics off;&lt;/P&gt;
&lt;P&gt;proc tree data=matrix1 out=New nclusters=5 noprint ;&lt;BR /&gt;height _rsq_;&lt;BR /&gt;copy RT_PROB ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 03:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489116#M4326</guid>
      <dc:creator>dustychair</dc:creator>
      <dc:date>2018-08-23T03:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: using a specific matrix as input for cluster analysis</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489154#M4327</link>
      <description>&lt;P&gt;All the matrices in IML are destroyed when you exit the procedure with 'quit'.&amp;nbsp;&amp;nbsp; In order to do what you want, you will need to add the IML statements:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create matrix1 from matrix1;
append from matrix1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to export the contents of matrix1 to&amp;nbsp;a SAS data set.&amp;nbsp;&amp;nbsp; There are other problems as matrix1 will be very sparse, mostly with missing values, and&amp;nbsp;you will not be able to run a cluster analysis on it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 08:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489154#M4327</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2018-08-23T08:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: using a specific matrix as input for cluster analysis</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489326#M4328</link>
      <description>&lt;P&gt;Hi lanWakeling,&lt;/P&gt;
&lt;P&gt;Thanks for your response,&lt;/P&gt;
&lt;P&gt;I added the statements you mentioned. Now I have the matrix but it does not have the candidates id numbers in rows and columns. I attached the output.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 16:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489326#M4328</guid>
      <dc:creator>dustychair</dc:creator>
      <dc:date>2018-08-23T16:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: using a specific matrix as input for cluster analysis</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489536#M4334</link>
      <description>&lt;P&gt;You can export row and column names at the same time as the matrix.&amp;nbsp; For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create matrix1 from matrix1 [rowname=levels colname=levels];
append from matrix1 [rowname=levels ];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 10:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/using-a-specific-matrix-as-input-for-cluster-analysis/m-p/489536#M4334</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2018-08-24T10:11:37Z</dc:date>
    </item>
  </channel>
</rss>

