<?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: a simple linear regression model that I need to run repeatedly, hope to have an automated soluti in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/a-simple-linear-regression-model-that-I-need-to-run-repeatedly/m-p/332181#M74743</link>
    <description>&lt;P&gt;Although&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/121677" target="_self"&gt;Karlb&lt;/A&gt;'s&amp;nbsp;solution will work, it tends to be slow. An alternative solution is to transform the data from wide form to long form. The new form of the data will contain 600 BY groups.&lt;SPAN&gt; The first contains the data for Y, Drug, and X1.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt; The second contains the data for Y, Drug, and X2. And so on. &amp;nbsp; For an example and discussion, see the article&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html" target="_self"&gt;"An easy way to run thousands of regressions in SAS"&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2017 14:19:11 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-02-13T14:19:11Z</dc:date>
    <item>
      <title>a simple linear regression model that I need to run repeatedly, hope to have an automated solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-simple-linear-regression-model-that-I-need-to-run-repeatedly/m-p/324023#M71873</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;I have this logistic regression model and would like to extract the p value of the interaction term "drug*var1".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;glm&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;=test;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;model&lt;/SPAN&gt;&amp;nbsp;bodyweight&amp;nbsp;= drug var1&amp;nbsp;drug*var1;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Problem is I need to do this 600 times because there are var1, var2, var3..... &amp;nbsp;.... var600. &amp;nbsp;Any thoughts appreciated!!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Raymond&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 18:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-simple-linear-regression-model-that-I-need-to-run-repeatedly/m-p/324023#M71873</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2017-01-11T18:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: a simple linear regression model that I need to run repeatedly, hope to have an automated soluti</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-simple-linear-regression-model-that-I-need-to-run-repeatedly/m-p/324052#M71891</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the idea is as follows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;ODS listing off;&lt;/P&gt;&lt;P&gt;you can stop procedure list output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;ODS output....;&lt;/P&gt;&lt;P&gt;you can direct procedure results (in your case the p values) to datasets, please check exact syntax...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;finally you macro loop around the Proc glm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro writep;&lt;/P&gt;&lt;P&gt;%do k=1 %to 600;&lt;/P&gt;&lt;P&gt;ods output ...out=pdset&amp;amp;k;&lt;/P&gt;&lt;P&gt;proc glm;&lt;/P&gt;&lt;P&gt;model bodyw = drug var&amp;amp;k drug * var&amp;amp;k;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;proc append base=pvalues data=pdset&amp;amp;k; run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%writep;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope it helps...&lt;/P&gt;&lt;P&gt;sincerly Karl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 21:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-simple-linear-regression-model-that-I-need-to-run-repeatedly/m-p/324052#M71891</guid>
      <dc:creator>Karlb</dc:creator>
      <dc:date>2017-01-11T21:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: a simple linear regression model that I need to run repeatedly, hope to have an automated soluti</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-simple-linear-regression-model-that-I-need-to-run-repeatedly/m-p/332181#M74743</link>
      <description>&lt;P&gt;Although&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/121677" target="_self"&gt;Karlb&lt;/A&gt;'s&amp;nbsp;solution will work, it tends to be slow. An alternative solution is to transform the data from wide form to long form. The new form of the data will contain 600 BY groups.&lt;SPAN&gt; The first contains the data for Y, Drug, and X1.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt; The second contains the data for Y, Drug, and X2. And so on. &amp;nbsp; For an example and discussion, see the article&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html" target="_self"&gt;"An easy way to run thousands of regressions in SAS"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 14:19:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-simple-linear-regression-model-that-I-need-to-run-repeatedly/m-p/332181#M74743</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-02-13T14:19:11Z</dc:date>
    </item>
  </channel>
</rss>

