<?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: fonction sample in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143139#M1202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rick. I have a last question. I'm starting with sas and i have no experience&amp;nbsp; to do&amp;nbsp; programs. What would the program be without remplacement?Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Mar 2014 15:55:36 GMT</pubDate>
    <dc:creator>ruther</dc:creator>
    <dc:date>2014-03-15T15:55:36Z</dc:date>
    <item>
      <title>fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143133#M1196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bonjour,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n'étant pas un fin connaisseur de SAS/IML, j"aimerais savoir dans un premier temps quelle est la différence entre SAS/IML et SAS/IML studio.&lt;/P&gt;&lt;P&gt;Par ailleurs, je souhaiterais utiliser la fonction sample et un message d'erreur apparaît m'indiquant qu'elle n'est pas disponible dans ma version de SAS/IML STUDIO (3.4).&lt;/P&gt;&lt;P&gt;Existerait elle donc dans SAS/IML? (je dispose de la version 9.3 de sas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;merci pour vos retours&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 17:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143133#M1196</guid>
      <dc:creator>ruther</dc:creator>
      <dc:date>2014-03-13T17:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143134#M1197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Please excuse me for not responding in French. I do not know the language well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a description of SAS/IML Studio, see the 2008 paper or the Introduction to the 2010 paper at &lt;A href="http://support.sas.com/rnd/app/iml/papers/index.html" title="http://support.sas.com/rnd/app/iml/papers/index.html"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SAS/IML and SAS/IML Studio Papers and Presentations&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/A&gt;Briefly,&amp;nbsp; SAS/IML is the product that you license. It is also the name of a matrix language. PROC IML implements the matrix languiage on the SAS server.&amp;nbsp; SAS/IML Studio is a development environment that enables SAS/IML programmers to develop SAS/IML programs. SAS/IML Studio runs on a Windows PC. It runs programs in IMLPlus, which is a language that includes SAS/IML syntax plus a Java-like syntax for creating dynamically linked graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SAMPLE function was introduced in SAS/IML 12.1 (See &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_whatsnew9_sect003.htm" title="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_whatsnew9_sect003.htm"&gt;SAS/IML(R) 12.1 User's Guide&lt;/A&gt;).&amp;nbsp; For SAS/IML 9.3, you can use a function from the book&lt;EM&gt; Statistical Programming with SAS/IML Software&lt;/EM&gt;. See the links in the first paragraph of the article &lt;A href="http://blogs.sas.com/content/iml/2014/01/23/sampling-with-replacement-easier/" title="http://blogs.sas.com/content/iml/2014/01/23/sampling-with-replacement-easier/"&gt;&amp;nbsp; Sampling with replacement: Now easier than ever in the SAS/IML language - The DO Loop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 18:16:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143134#M1197</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-03-13T18:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143135#M1198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Merci Rick! so, i wiill try to speak in english.&lt;/P&gt;&lt;P&gt;First, because of you, i have perfectly understood what IML is. However, i´ve tryed to follow the steps described in your topic about the sampling with and without remplacement by using the sample´s function and it doesn't work ,while it should be possible with sas 9.3&lt;/P&gt;&lt;P&gt;For example, i have this message in the log:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;598&amp;nbsp; proc IML;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;NOTE: IML Ready&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;599&amp;nbsp; x=1:5;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;600&amp;nbsp; call randseed(325);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;601&amp;nbsp; s_1=sample(x);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;ERROR: Invocation of unresolved module SAMPLE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;statement : ASSIGN at line 601 column 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;602&amp;nbsp; print s_1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;ERROR: Matrix s_1 has not been set to a value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: rgba(255, 255, 255, 0);"&gt;statement : PRINT at line 602 column 1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 17:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143135#M1198</guid>
      <dc:creator>ruther</dc:creator>
      <dc:date>2014-03-14T17:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143136#M1199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should have sent you the direct link to the SAS/IML 9.3 module for sampling with replacement: &lt;A href="http://blogs.sas.com/content/iml/2010/11/05/sampling-with-replacement/" title="http://blogs.sas.com/content/iml/2010/11/05/sampling-with-replacement/"&gt;Sampling with replacement in SAS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Your program will look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;BR /&gt;/* Define module for random sampling with replacement and uniform probability.&lt;BR /&gt;&amp;nbsp; A is row vector with n elements and each sample contains k elements. &lt;BR /&gt;&amp;nbsp; The result is an nSamples x k matrix. Each row contains one sample. */&lt;BR /&gt;start SampleReplaceUni(A, nSamples, k);&lt;BR /&gt;&amp;nbsp; results = j(nSamples, k);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* allocate result matrix */&lt;BR /&gt;&amp;nbsp; call randgen(results, "Uniform"); /* fill with random U(0,1) */&lt;BR /&gt;&amp;nbsp; n = ncol(A);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* number of elements */&lt;BR /&gt;&amp;nbsp; results = ceil(n*results);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* convert to integers 1,2,...n */&lt;BR /&gt;&amp;nbsp; return(shape(A[results], nSamples)); /* reshape and return from A */&lt;BR /&gt;finish;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call randseed(1234);&lt;BR /&gt;/* Draw 5 elements with replacement from {1,2,...,8}; Repeat 10 times */&lt;BR /&gt;s = SampleReplaceUni(1:8, 10, 5); &lt;BR /&gt;print s;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 20:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143136#M1199</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-03-14T20:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143137#M1200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MERCI BEAUCOUP!;)&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 20:28:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143137#M1200</guid>
      <dc:creator>ruther</dc:creator>
      <dc:date>2014-03-14T20:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143138#M1201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Je vous en prie. Bonne chance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 20:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143138#M1201</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-03-14T20:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143139#M1202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rick. I have a last question. I'm starting with sas and i have no experience&amp;nbsp; to do&amp;nbsp; programs. What would the program be without remplacement?Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 15:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143139#M1202</guid>
      <dc:creator>ruther</dc:creator>
      <dc:date>2014-03-15T15:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: fonction sample</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143140#M1203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your version of SAS is now almost 3 years old. There have been three releases of SAS/IML software since then. If you want the newer features, I encourage you to upgrade your version of SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To gain experience with SAS/IML programming, I recommend the book &lt;EM&gt;&lt;A href="http://support.sas.com/publishing/authors/wicklin.html"&gt;Statistical Programming with SAS/IML Software&lt;/A&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not have a module that does sampling without replacement that works for SAS/IML 9.3. You can use the SURVEYSELECT procedure in SAS/STAT, as shown in this article: &lt;A href="http://blogs.sas.com/content/iml/2014/02/03/sample-without-replacement/" title="http://blogs.sas.com/content/iml/2014/02/03/sample-without-replacement/"&gt; Sample without replacement in SAS - The DO Loop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Mar 2014 12:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/fonction-sample/m-p/143140#M1203</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-03-16T12:23:18Z</dc:date>
    </item>
  </channel>
</rss>

