<?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 Two sample KS test in SAS IML? in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102826#M754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I do a two sample KS test in SAS IML of the null hypothesis that the two empirical distributions were drawn from the same &lt;EM&gt;continuous&lt;/EM&gt; distribution? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2013 18:10:41 GMT</pubDate>
    <dc:creator>SidBajpai</dc:creator>
    <dc:date>2013-04-09T18:10:41Z</dc:date>
    <item>
      <title>Two sample KS test in SAS IML?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102826#M754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I do a two sample KS test in SAS IML of the null hypothesis that the two empirical distributions were drawn from the same &lt;EM&gt;continuous&lt;/EM&gt; distribution? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 18:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102826#M754</guid>
      <dc:creator>SidBajpai</dc:creator>
      <dc:date>2013-04-09T18:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Two sample KS test in SAS IML?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102827#M755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably the easiest way is to leverage PROC NPAR1WAY, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;BR /&gt;/* the data */&lt;/P&gt;&lt;P&gt;x = T(1:10);&lt;BR /&gt;y = {2,2,3,5,5,6,6,8,9,10};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* concatenate data and add ID variable; write to data set */&lt;BR /&gt;ID = repeat(1, nrow(x)) // repeat(2, nrow(x));&lt;BR /&gt;z = x // y;&lt;/P&gt;&lt;P&gt;create KSData var {ID z};&lt;BR /&gt;append;&lt;BR /&gt;close KSData;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc npar1way data=KSData edf;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; class ID;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var z;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to stay inside PROC IML, you can use the SUBMIT and ENDSUBMIT statements to call PROC NPAR1WAY and then read in whatever statistics you need from the procedure output. For details and an example, see &lt;A href="http://blogs.sas.com/content/iml/2011/10/24/video-calling-sas-procedures-from-the-sasiml-language/" title="http://blogs.sas.com/content/iml/2011/10/24/video-calling-sas-procedures-from-the-sasiml-language/"&gt; Video: Calling SAS procedures from the SAS/IML language - The DO Loop&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 19:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102827#M755</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-04-09T19:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Two sample KS test in SAS IML?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102828#M756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dr Wicklin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is really helpful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if in the code above,&lt;/P&gt;&lt;P&gt;x is a nxm matrix,&lt;/P&gt;&lt;P&gt;y is a px1 vector,&lt;/P&gt;&lt;P&gt;where n≠m≠p&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value n,m and p can change each time I run the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if I have to get the P value of the KS test for each column of matrix x by the column vector y, how do you suggest I modify this code above in IML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 13:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102828#M756</guid>
      <dc:creator>SidBajpai</dc:creator>
      <dc:date>2013-04-10T13:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Two sample KS test in SAS IML?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102829#M757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's almost the same, you just need to replicate y and run PROC NPAR1WAY on x1-xm. For example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc iml;&lt;BR /&gt;/* the data */&lt;BR /&gt;x = T(1:10)|| T(0:9) || T(2:11);&lt;BR /&gt;y = {2,5,3,8,7,6,6,9};&lt;/P&gt;&lt;P&gt;/* concatenate data and add ID variable; write to data set */&lt;BR /&gt;z = x // repeat(y, 1, ncol(x));&lt;BR /&gt;ID = repeat(1, nrow(x)) // repeat(2, nrow(y));&lt;/P&gt;&lt;P&gt;Q = ID || z;&lt;BR /&gt;varNames = "ID" || ("x1":("x"+strip(char(ncol(x)))));&lt;BR /&gt;create KSData from Q[c=varNames];&lt;BR /&gt;append from Q;&lt;BR /&gt;close KSData;&lt;/P&gt;&lt;P&gt;/* submit; */&lt;/P&gt;&lt;P&gt;proc npar1way data=KSData plots=none noprint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; class ID;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var x:;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output out=KSOUT edf;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/* endsubmit; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now read the p-values, which are in the KSOUT data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 14:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102829#M757</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-04-10T14:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Two sample KS test in SAS IML?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102830#M758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 17:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Two-sample-KS-test-in-SAS-IML/m-p/102830#M758</guid>
      <dc:creator>SidBajpai</dc:creator>
      <dc:date>2013-04-10T17:43:51Z</dc:date>
    </item>
  </channel>
</rss>

