<?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: need to run this regression repeatedly from a dataset that contains 600 variables (var1....var60 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324032#M71878</link>
    <description>&lt;P&gt;thanks for the quick reply&lt;/P&gt;
&lt;P&gt;not sure if I understand fully and I have attached the screen shots of dataset and the transposed screenshot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can u be more specific how to plug variable names into this regression model?&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;=transposed;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;model&lt;/SPAN&gt; bodyweight= 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;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13315i375616C8934DF844/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="transposed.png" title="transposed.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13316iB275581260901F4B/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="dataset.png" title="dataset.png" /&gt;</description>
    <pubDate>Wed, 11 Jan 2017 19:34:58 GMT</pubDate>
    <dc:creator>rykwong</dc:creator>
    <dc:date>2017-01-11T19:34:58Z</dc:date>
    <item>
      <title>need to run this regression repeatedly from a dataset that contains 600 variables (var1....var600)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324024#M71874</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:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324024#M71874</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2017-01-11T18:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: need to run this regression repeatedly from a dataset that contains 600 variables (var1....var60</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324027#M71876</link>
      <description>&lt;P&gt;Transpose the 600 variable to observations with and BY variable that IDs them.&amp;nbsp; Then run your program with BY statement.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 19:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324027#M71876</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-01-11T19:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: need to run this regression repeatedly from a dataset that contains 600 variables (var1....var60</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324032#M71878</link>
      <description>&lt;P&gt;thanks for the quick reply&lt;/P&gt;
&lt;P&gt;not sure if I understand fully and I have attached the screen shots of dataset and the transposed screenshot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can u be more specific how to plug variable names into this regression model?&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;=transposed;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;model&lt;/SPAN&gt; bodyweight= 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;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13315i375616C8934DF844/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="transposed.png" title="transposed.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13316iB275581260901F4B/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="dataset.png" title="dataset.png" /&gt;</description>
      <pubDate>Wed, 11 Jan 2017 19:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324032#M71878</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2017-01-11T19:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: need to run this regression repeatedly from a dataset that contains 600 variables (var1....var60</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324036#M71880</link>
      <description>&lt;P&gt;Don't show screen shots.&amp;nbsp; Include example data in your post that can me copied and pasted into a program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 19:44:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324036#M71880</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-01-11T19:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: need to run this regression repeatedly from a dataset that contains 600 variables (var1....var60</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324038#M71882</link>
      <description>&lt;P&gt;thanks again.&lt;/P&gt;
&lt;P&gt;the dataset (call it dataset1) looks like this&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 260pt;" border="0" width="348" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 65pt;" width="87" /&gt; &lt;COL style="width: 65pt;" span="3" width="87" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD width="87" height="21" class="xl63" style="height: 16.0pt; width: 65pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="87" class="xl64" style="width: 65pt;"&gt;var1&lt;/TD&gt;
&lt;TD width="87" class="xl64" style="width: 65pt;"&gt;var2&lt;/TD&gt;
&lt;TD width="87" class="xl64" style="width: 65pt;"&gt;var3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD height="21" class="xl63" style="height: 16.0pt;"&gt;patient1&lt;/TD&gt;
&lt;TD class="xl64"&gt;10&lt;/TD&gt;
&lt;TD class="xl64"&gt;1&lt;/TD&gt;
&lt;TD class="xl64"&gt;1000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD height="21" class="xl63" style="height: 16.0pt;"&gt;patient2&lt;/TD&gt;
&lt;TD class="xl64"&gt;0&lt;/TD&gt;
&lt;TD class="xl64"&gt;2&lt;/TD&gt;
&lt;TD class="xl64"&gt;1400&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD height="21" class="xl63" style="height: 16.0pt;"&gt;patient3&lt;/TD&gt;
&lt;TD class="xl64"&gt;30&lt;/TD&gt;
&lt;TD class="xl64"&gt;3&lt;/TD&gt;
&lt;TD class="xl64"&gt;1300&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD height="21" class="xl63" style="height: 16.0pt;"&gt;patient4&lt;/TD&gt;
&lt;TD class="xl64"&gt;40&lt;/TD&gt;
&lt;TD class="xl64"&gt;4&lt;/TD&gt;
&lt;TD class="xl64"&gt;
&lt;P&gt;1600&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after transposing it (call it dataset2), it looks like this and I added varname as the header&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 325pt;" border="0" width="435" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 65pt;" width="87" /&gt; &lt;COL style="width: 65pt;" span="3" width="87" /&gt; &lt;COL style="width: 65pt;" width="87" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD width="87" height="21" class="xl63" style="height: 16.0pt; width: 65pt;"&gt;varname&lt;/TD&gt;
&lt;TD width="87" class="xl63" style="width: 65pt;"&gt;patient1&lt;/TD&gt;
&lt;TD width="87" class="xl63" style="width: 65pt;"&gt;patient2&lt;/TD&gt;
&lt;TD width="87" class="xl63" style="width: 65pt;"&gt;patient3&lt;/TD&gt;
&lt;TD width="87" class="xl63" style="width: 65pt;"&gt;patient4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD height="21" class="xl64" style="height: 16.0pt;"&gt;var1&lt;/TD&gt;
&lt;TD class="xl64"&gt;10&lt;/TD&gt;
&lt;TD class="xl64"&gt;0&lt;/TD&gt;
&lt;TD class="xl64"&gt;30&lt;/TD&gt;
&lt;TD class="xl64"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD height="21" class="xl64" style="height: 16.0pt;"&gt;var2&lt;/TD&gt;
&lt;TD class="xl64"&gt;1&lt;/TD&gt;
&lt;TD class="xl64"&gt;2&lt;/TD&gt;
&lt;TD class="xl64"&gt;3&lt;/TD&gt;
&lt;TD class="xl64"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 16.0pt;"&gt;
&lt;TD height="21" class="xl64" style="height: 16.0pt;"&gt;var3&lt;/TD&gt;
&lt;TD class="xl64"&gt;1000&lt;/TD&gt;
&lt;TD class="xl64"&gt;1400&lt;/TD&gt;
&lt;TD class="xl64"&gt;1300&lt;/TD&gt;
&lt;TD class="xl64"&gt;1600&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I plug the variables (var1....var3) into the regression model?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 19:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324038#M71882</guid>
      <dc:creator>rykwong</dc:creator>
      <dc:date>2017-01-11T19:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: need to run this regression repeatedly from a dataset that contains 600 variables (var1....var60</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324040#M71884</link>
      <description>&lt;P&gt;Run this example and study how it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=sashelp.class out=class;
   by name age sex;
   var height weight;
   run;
proc sort data=class;
   by _name_;
   run;
proc print;
   run;
proc glm;
   by _name_;
   class sex;
   model age= sex sex*col1;
   run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Jan 2017 20:17:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-to-run-this-regression-repeatedly-from-a-dataset-that/m-p/324040#M71884</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-01-11T20:17:19Z</dc:date>
    </item>
  </channel>
</rss>

