<?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 How to do a Markov chain to predict the next state from a  sequence of previous states? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450426#M6847</link>
    <description>&lt;P&gt;I have a dataset that contains the state details&amp;nbsp;for 50 customers from time T1 to T20. The rows have customer ID followed by the sequence of states they were in for the past 20 time periods. There are only 4 states A, B, C, D. the&amp;nbsp;data&amp;nbsp;looks like this:&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;CUS-ID&amp;nbsp; T1 T2 ... T20&lt;BR /&gt;C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D C ...&amp;nbsp; B&lt;BR /&gt;C2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C D ... A&lt;BR /&gt;...&lt;BR /&gt;C50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A C ... B&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Using Markov chains I want to predict the state at time T21 and the associated probability of being in that predicted state. Is there a way in SAS where I can use a PROC or do I have to code from scratch? I also need help writing the code from scratch if there are no special PROCs.&lt;BR /&gt;I also do not have any initial transition probabilities. Is there a good rule that I can base my initial transition probabilities on?&lt;BR /&gt;Any help on documentation specific to similar problems will be much appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Apr 2018 18:39:34 GMT</pubDate>
    <dc:creator>SC_1991</dc:creator>
    <dc:date>2018-04-02T18:39:34Z</dc:date>
    <item>
      <title>How to do a Markov chain to predict the next state from a  sequence of previous states?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450426#M6847</link>
      <description>&lt;P&gt;I have a dataset that contains the state details&amp;nbsp;for 50 customers from time T1 to T20. The rows have customer ID followed by the sequence of states they were in for the past 20 time periods. There are only 4 states A, B, C, D. the&amp;nbsp;data&amp;nbsp;looks like this:&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;CUS-ID&amp;nbsp; T1 T2 ... T20&lt;BR /&gt;C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D C ...&amp;nbsp; B&lt;BR /&gt;C2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C D ... A&lt;BR /&gt;...&lt;BR /&gt;C50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A C ... B&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Using Markov chains I want to predict the state at time T21 and the associated probability of being in that predicted state. Is there a way in SAS where I can use a PROC or do I have to code from scratch? I also need help writing the code from scratch if there are no special PROCs.&lt;BR /&gt;I also do not have any initial transition probabilities. Is there a good rule that I can base my initial transition probabilities on?&lt;BR /&gt;Any help on documentation specific to similar problems will be much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 18:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450426#M6847</guid>
      <dc:creator>SC_1991</dc:creator>
      <dc:date>2018-04-02T18:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Markov chain to predict the next state from a  sequence of previous states?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450598#M6850</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;did wrote a couple of blog about Markov Chain .&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/" target="_blank"&gt;https://blogs.sas.com/content/iml/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 12:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450598#M6850</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-04-03T12:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Markov chain to predict the next state from a  sequence of previous states?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450602#M6851</link>
      <description>&lt;P&gt;I think you should transform your data like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID PREV CURRENT&lt;/P&gt;
&lt;P&gt;C1 D&amp;nbsp; &amp;nbsp; C&lt;/P&gt;
&lt;P&gt;C1 C&amp;nbsp; &amp;nbsp;A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that ,using proc freq to get transform probability .&lt;/P&gt;
&lt;P&gt;And PROC TRANSPOSE to get transform matrix .&lt;/P&gt;
&lt;P&gt;And put this matrix into SAS/IML and do some matrix multiply operator.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 12:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450602#M6851</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-04-03T12:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Markov chain to predict the next state from a  sequence of previous states?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450677#M6853</link>
      <description>&lt;P&gt;Are you implying that I have only 2 time periods ( prev and current) and then calculate the transition probabilities or did you mean arrange the states from left to right left being the earliest?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 14:52:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/450677#M6853</guid>
      <dc:creator>SC_1991</dc:creator>
      <dc:date>2018-04-03T14:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Markov chain to predict the next state from a  sequence of previous states?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/451058#M6856</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;mean arrange the states from left to right left being the earliest"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 12:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/451058#M6856</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-04-04T12:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Markov chain to predict the next state from a  sequence of previous states?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/480233#M7200</link>
      <description>Hello were you able to get the answer ? Because I have similar question and I am also looking for some programme to do it</description>
      <pubDate>Sun, 22 Jul 2018 13:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-do-a-Markov-chain-to-predict-the-next-state-from-a/m-p/480233#M7200</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-22T13:37:24Z</dc:date>
    </item>
  </channel>
</rss>

