<?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 PROC MODEL efficiency - multiple small or one big with &amp;quot;by&amp;quot;? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MODEL-efficiency-multiple-small-or-one-big-with-quot-by/m-p/292953#M59954</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be glad, if you could help me with the following performance issue.&lt;/P&gt;&lt;P&gt;My question is, if it were more favourable, to run the "proc model procedure" on multiple small data sets separately or to run it on a big data set, containing all the small data sets "stack" (i.e., via data statement) und run "proc model" with a "by" statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scenario is the following:&lt;BR /&gt;I run the first simulation-loop to generate a data set, run five regressions, store the parameter estimates.&lt;/P&gt;&lt;P&gt;I run the second simulation-loop to generate a date set, run five regressions, store the parameter estimates.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My idea is the following:&lt;BR /&gt;I would like to run all simulation loops in a row, get, e.g., 5000 data sets, each with a indicator-variable (e.g. "simit") equal to the number of iteration. Then, I stag all the data sets via a data statement. In the following, I run only 5 proc model with "by simit" instead of&lt;/P&gt;&lt;P&gt;5 * 5000 = 25000&lt;/P&gt;&lt;P&gt;times proc model.&lt;/P&gt;&lt;P&gt;My question is, if this procedure were more efficient.&lt;/P&gt;&lt;P&gt;One the one hand, I do have to evoke the procedure less often, on the other hand, the data set with the by-statement might be huge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be glad, if you would answer me, for I am sue, it would help me to learn, how programs are generally written more efficiently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours sincerely,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;</description>
    <pubDate>Sun, 21 Aug 2016 05:58:30 GMT</pubDate>
    <dc:creator>Sinistrum</dc:creator>
    <dc:date>2016-08-21T05:58:30Z</dc:date>
    <item>
      <title>PROC MODEL efficiency - multiple small or one big with "by"?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MODEL-efficiency-multiple-small-or-one-big-with-quot-by/m-p/292953#M59954</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be glad, if you could help me with the following performance issue.&lt;/P&gt;&lt;P&gt;My question is, if it were more favourable, to run the "proc model procedure" on multiple small data sets separately or to run it on a big data set, containing all the small data sets "stack" (i.e., via data statement) und run "proc model" with a "by" statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scenario is the following:&lt;BR /&gt;I run the first simulation-loop to generate a data set, run five regressions, store the parameter estimates.&lt;/P&gt;&lt;P&gt;I run the second simulation-loop to generate a date set, run five regressions, store the parameter estimates.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My idea is the following:&lt;BR /&gt;I would like to run all simulation loops in a row, get, e.g., 5000 data sets, each with a indicator-variable (e.g. "simit") equal to the number of iteration. Then, I stag all the data sets via a data statement. In the following, I run only 5 proc model with "by simit" instead of&lt;/P&gt;&lt;P&gt;5 * 5000 = 25000&lt;/P&gt;&lt;P&gt;times proc model.&lt;/P&gt;&lt;P&gt;My question is, if this procedure were more efficient.&lt;/P&gt;&lt;P&gt;One the one hand, I do have to evoke the procedure less often, on the other hand, the data set with the by-statement might be huge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be glad, if you would answer me, for I am sue, it would help me to learn, how programs are generally written more efficiently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours sincerely,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2016 05:58:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MODEL-efficiency-multiple-small-or-one-big-with-quot-by/m-p/292953#M59954</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2016-08-21T05:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MODEL efficiency - multiple small or one big with "by"?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MODEL-efficiency-multiple-small-or-one-big-with-quot-by/m-p/292973#M59955</link>
      <description>&lt;P&gt;I usually go with "BY" processing. "BY" processing is fast and efficient specially if you don't need to sort your data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2016 10:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MODEL-efficiency-multiple-small-or-one-big-with-quot-by/m-p/292973#M59955</guid>
      <dc:creator>sinmathstat</dc:creator>
      <dc:date>2016-08-21T10:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MODEL efficiency - multiple small or one big with "by"?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MODEL-efficiency-multiple-small-or-one-big-with-quot-by/m-p/292984#M59956</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and thank you for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After reading your post, I tried to rewrite the simulation.&lt;/P&gt;&lt;P&gt;From former 144 minutes, I have come down to 23 minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The proc model with by took&lt;/P&gt;&lt;P&gt;real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20.00 seconds&lt;BR /&gt;cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19.92 seconds&lt;/P&gt;&lt;P&gt;which means, that it&amp;nbsp; does not work the way I have feared.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 5000 loops, which has meant 5000*~0,2 seconds = 1000 seconds = 16 2/3 minutes to achieve the same result with 5000 proc model statements.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2016 12:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MODEL-efficiency-multiple-small-or-one-big-with-quot-by/m-p/292984#M59956</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2016-08-21T12:34:42Z</dc:date>
    </item>
  </channel>
</rss>

