<?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 use IML in the proc sql in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/use-IML-in-the-proc-sql/m-p/70776#M434</link>
    <description>i have dataset as following &lt;BR /&gt;
&lt;BR /&gt;
now i have a question about usin IML in proc sql as the code below&lt;BR /&gt;
&lt;BR /&gt;
in the code, RollGibbs is the code using IML dsIn is the data read&lt;BR /&gt;
&lt;BR /&gt;
i can not understand why do this procedure?&lt;BR /&gt;
&lt;BR /&gt;
please help me~plz&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data zachary;&lt;BR /&gt;
input id x;&lt;BR /&gt;
cards;&lt;BR /&gt;
1        4&lt;BR /&gt;
1        2&lt;BR /&gt;
1        3&lt;BR /&gt;
2        3&lt;BR /&gt;
2        4&lt;BR /&gt;
2        5&lt;BR /&gt;
2        4&lt;BR /&gt;
3   5&lt;BR /&gt;
3   8&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
%macro zachary(n);&lt;BR /&gt;
        %do i=1 %to &amp;amp;n;&lt;BR /&gt;
                proc sql noprint;&lt;BR /&gt;
                        create table set&amp;amp;i as&lt;BR /&gt;
                        select id,%RollGibbs(dsIn); as mean_x&lt;BR /&gt;
                        from zachary&lt;BR /&gt;
                        where id=&amp;amp;i&lt;BR /&gt;
                        group by id;&lt;BR /&gt;
                quit;&lt;BR /&gt;
        %end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%zachary(3);</description>
    <pubDate>Sat, 28 May 2011 08:48:39 GMT</pubDate>
    <dc:creator>Wes</dc:creator>
    <dc:date>2011-05-28T08:48:39Z</dc:date>
    <item>
      <title>use IML in the proc sql</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/use-IML-in-the-proc-sql/m-p/70776#M434</link>
      <description>i have dataset as following &lt;BR /&gt;
&lt;BR /&gt;
now i have a question about usin IML in proc sql as the code below&lt;BR /&gt;
&lt;BR /&gt;
in the code, RollGibbs is the code using IML dsIn is the data read&lt;BR /&gt;
&lt;BR /&gt;
i can not understand why do this procedure?&lt;BR /&gt;
&lt;BR /&gt;
please help me~plz&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data zachary;&lt;BR /&gt;
input id x;&lt;BR /&gt;
cards;&lt;BR /&gt;
1        4&lt;BR /&gt;
1        2&lt;BR /&gt;
1        3&lt;BR /&gt;
2        3&lt;BR /&gt;
2        4&lt;BR /&gt;
2        5&lt;BR /&gt;
2        4&lt;BR /&gt;
3   5&lt;BR /&gt;
3   8&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
%macro zachary(n);&lt;BR /&gt;
        %do i=1 %to &amp;amp;n;&lt;BR /&gt;
                proc sql noprint;&lt;BR /&gt;
                        create table set&amp;amp;i as&lt;BR /&gt;
                        select id,%RollGibbs(dsIn); as mean_x&lt;BR /&gt;
                        from zachary&lt;BR /&gt;
                        where id=&amp;amp;i&lt;BR /&gt;
                        group by id;&lt;BR /&gt;
                quit;&lt;BR /&gt;
        %end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%zachary(3);</description>
      <pubDate>Sat, 28 May 2011 08:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/use-IML-in-the-proc-sql/m-p/70776#M434</guid>
      <dc:creator>Wes</dc:creator>
      <dc:date>2011-05-28T08:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: use IML in the proc sql</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/use-IML-in-the-proc-sql/m-p/70777#M435</link>
      <description>I don't understand what the SQL code is trying to do. Is this some kind of resampling? Please describe in words what you are trying to accomplish, or provide the macro function that you are calling so that we can run it ourselves.&lt;BR /&gt;
&lt;BR /&gt;
If this is a resampling problem, I would do it all in SAS/IML without bothering with SQL.  For example, I'd read in the ID variable, use the UNIQUE function to get the numbers {1,2,3}, and then use RANDGEN to generate random numbers in the range 1:3. I can't tell yet how you are using the X variable.</description>
      <pubDate>Mon, 30 May 2011 19:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/use-IML-in-the-proc-sql/m-p/70777#M435</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2011-05-30T19:37:26Z</dc:date>
    </item>
  </channel>
</rss>

