<?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 to get a Similarity Matrix in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118504#M651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Udo. That's very helpful. I didn't realize that statement INPUT was optional and that in its absence, target sequences would also be considered as input sequences. I hadn't read the clustering example since I have another application in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jun 2013 19:34:02 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2013-06-25T19:34:02Z</dc:date>
    <item>
      <title>How to get a Similarity Matrix</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118502#M649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In article &lt;/SPAN&gt;&lt;EM style="font-size: 10pt;"&gt;An Introduction to Similarity Analysis Using SAS &lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;by Leonard et al., similarity matrices are introduced in these terms :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN lang="EN-CA" style="color: black; font-family: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Similarity measures can be used to compare several&lt;BR /&gt;time sequences to form a &lt;EM&gt;similarity matrix&lt;/EM&gt;. This situation usually&lt;BR /&gt;arises in &lt;EM&gt;time series clustering&lt;/EM&gt;. For example, given &lt;EM&gt;K &lt;/EM&gt;time&lt;BR /&gt;sequences, a (KxK) symmetric matrix can be constructed whose &lt;EM&gt;ij&lt;/EM&gt;th&lt;BR /&gt;element contains the similarity measure between the &lt;EM&gt;i&lt;/EM&gt;th and &lt;EM&gt;j&lt;/EM&gt;th&lt;BR /&gt;sequence.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;That's a neet idea. However, Proc Similarity (in SAS/ETS 9.3) doesn't accept the same series to be listed as an input and a target sequence. What is the best way to get a similarity matrix with Proc Similarity?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;PG&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 16:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118502#M649</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-25T16:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a Similarity Matrix</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118503#M650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;This example might be useful - additional information can be found here: &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_similarity_sect036.htm"&gt;http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_similarity_sect036.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Udo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data tmp;&lt;/P&gt;&lt;P&gt; set sashelp.snacks;&lt;/P&gt;&lt;P&gt; retain Series 0;&lt;/P&gt;&lt;P&gt; if first.product then series+1;&lt;/P&gt;&lt;P&gt; by product;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=tmp out=tmp2;&lt;/P&gt;&lt;P&gt; by date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=tmp2&lt;/P&gt;&lt;P&gt; OUT=tmp3&lt;/P&gt;&lt;P&gt; PREFIX=C_&lt;/P&gt;&lt;P&gt; NAME=reihe&lt;/P&gt;&lt;P&gt; LABEL=Etikett&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt; BY Date;&lt;/P&gt;&lt;P&gt; ID series;&lt;/P&gt;&lt;P&gt; VAR QtySold;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc similarity data=tmp3 out=_null_ outsum=summary;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id date interval=day accumulate=total;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; target _numeric_ /normalize=standard measure=mabsdevmax;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data matrix(type=distance);&lt;/P&gt;&lt;P&gt;set summary;&lt;/P&gt;&lt;P&gt;drop _status_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc cluster data=matrix outtree=tree method=average;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id _input_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc tree data=tree out=result nclusters=4;&lt;/P&gt;&lt;P&gt;id _input_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 18:45:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118503#M650</guid>
      <dc:creator>udo_sas</dc:creator>
      <dc:date>2013-06-25T18:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a Similarity Matrix</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118504#M651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Udo. That's very helpful. I didn't realize that statement INPUT was optional and that in its absence, target sequences would also be considered as input sequences. I hadn't read the clustering example since I have another application in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 19:34:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118504#M651</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-25T19:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a Similarity Matrix</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118505#M652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PS: my colleague &lt;A __default_attr="129106" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; posted a very interesting blog today on &lt;A href="http://blogs.sas.com/content/iml/2013/06/26/color-clusters-in-dendogram/" title="http://blogs.sas.com/content/iml/2013/06/26/color-clusters-in-dendogram/"&gt;How to color clusters in a dendogram - The DO Loop&lt;/A&gt; - which might be of interest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 14:53:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-get-a-Similarity-Matrix/m-p/118505#M652</guid>
      <dc:creator>udo_sas</dc:creator>
      <dc:date>2013-06-26T14:53:10Z</dc:date>
    </item>
  </channel>
</rss>

