<?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: Proc GLM and MACRO in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531629#M145546</link>
    <description>&lt;P&gt;All explained here:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No macros needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in my opinion, not a good idea to perform regressions like this, hundreds or thousands of variables individually.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jan 2019 13:21:05 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-01-31T13:21:05Z</dc:date>
    <item>
      <title>Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531611#M145533</link>
      <description>&lt;P&gt;Hi all!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a confussion to perform GLM&amp;nbsp;with a macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B1&lt;/TD&gt;&lt;TD&gt;B2&lt;/TD&gt;&lt;TD&gt;B3&lt;/TD&gt;&lt;TD&gt;B4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0.1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0.9&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0.78&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0.64&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&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;and I need to perform several regression over variable the A. For example: A ~B1, A~B2, A~B3 etc.... (I have ~300 of variables).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Later, I need all the p-values of each association to evaluate if one of the associations is true.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't have clue how to do it...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help, as always!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 12:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531611#M145533</guid>
      <dc:creator>CarolBarahona</dc:creator>
      <dc:date>2019-01-31T12:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531629#M145546</link>
      <description>&lt;P&gt;All explained here:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No macros needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in my opinion, not a good idea to perform regressions like this, hundreds or thousands of variables individually.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 13:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531629#M145546</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-31T13:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531643#M145554</link>
      <description>&lt;P&gt;Maybe, I didn't explain very well, but my variable X is categorical (just 3 values are possible) and Y variable is continuous.&lt;BR /&gt;So, I think is not possible to perform that code, or am I wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 14:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531643#M145554</guid>
      <dc:creator>CarolBarahona</dc:creator>
      <dc:date>2019-01-31T14:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531644#M145555</link>
      <description>&lt;P&gt;Use PROC GLM instead of PROC REG.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 14:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531644#M145555</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-31T14:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531647#M145556</link>
      <description>Yes, but I don't know how to modify the previous code that you send me... sorry! I tried to applied to my dataset and I don't have results...</description>
      <pubDate>Thu, 31 Jan 2019 14:42:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531647#M145556</guid>
      <dc:creator>CarolBarahona</dc:creator>
      <dc:date>2019-01-31T14:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531665#M145559</link>
      <description>&lt;P&gt;Show us the code you tried.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 15:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531665#M145559</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-31T15:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531670#M145563</link>
      <description>&lt;P&gt;I'm trying with something simple like this:&lt;BR /&gt;&lt;BR /&gt;proc glm data=exp;&lt;BR /&gt;class b1;&lt;BR /&gt;model a=b1;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;but I need to incorporate a macro because I have B1-B300 and also modified to retain just the p-values for each association.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 15:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531670#M145563</guid>
      <dc:creator>CarolBarahona</dc:creator>
      <dc:date>2019-01-31T15:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531672#M145564</link>
      <description>&lt;P&gt;You don't need a macro. The link I gave explains how to do this without a macro. Scroll down to the section entitled "The BY way for many models". Give that a try. If you get stuck, show us your code.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 15:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531672#M145564</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-31T15:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531706#M145581</link>
      <description>&lt;P&gt;I modified the code but the problem now, is that the code don't give the p-value for each association evaluated. What is coded as "value" in proc print is not p-value of the association.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data try1;&lt;BR /&gt;set exp; /* &amp;lt;== specify data set name HERE */&lt;BR /&gt;array new_SNP [*] new_SNP1 - new_SNP280; /* &amp;lt;== specify explanatory variables HERE */&lt;BR /&gt;do varNum = 1 to dim(new_SNP);&lt;BR /&gt;VarName = vname(new_SNP[varNum]); /* variable name in char var */&lt;BR /&gt;Value = new_SNP[varNum]; /* value for each variable for each obs */&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;drop new_SNP:;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* 2. Sort by BY-group variable */&lt;BR /&gt;proc sort data=try1; by VarName; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* 3. Call PROC REG and use BY statement to compute all regressions */&lt;BR /&gt;proc glm data=try1 noprint outest=PE;&lt;BR /&gt;by VarName;&lt;BR /&gt;model south_ref = Value;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;/* Look at the results */&lt;BR /&gt;proc print data=PE(obs=5);&lt;BR /&gt;var VarName Intercept Value;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 16:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531706#M145581</guid>
      <dc:creator>CarolBarahona</dc:creator>
      <dc:date>2019-01-31T16:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLM and MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531717#M145588</link>
      <description>&lt;P&gt;I think you need to add a CLASS statement to your PROC GLM, since your variable named value is CLASS and not continuous.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the overall p-value for the model, you also need the ODS OUTPUT statement like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output overallanova=pe;
proc glm data=try1 noprint;
by VarName;
class value;
model south_ref = Value;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-GLM-and-MACRO/m-p/531717#M145588</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-01-31T17:07:23Z</dc:date>
    </item>
  </channel>
</rss>

