<?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: Automatically select discrete/categorical variables for CLASS statement in PROC GLM in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485400#M287126</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225406"&gt;@bspan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hey all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New SAS user here - attempting to do some linear regression on a large data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand the basics of running PROC GLM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc glm data=dset plots=all; 
class b c; 
model y = a--d / solution;
run;&lt;/PRE&gt;
&lt;P&gt;My problem is that the number of class variables is far too big to list out manually. The dataset contains about 100 variables and its split between continuous and discrete. Is there a way that SAS can determine which variable should belong in the CLASS statement on its own?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As stated by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;, you can indeed do this easily. However, I would advise against it as being a poor practice. If you have a lot of class variable levels in total, GLM will grind to a halt and take a very long time to compute the results. Furthermore, such results most likely will not be meaningful or useful as most of your 100 variables will be correlated with each other, causing additional estimation problems and interpretation problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A better approach would be to use PROC PLS on this data set, PLS handles the multiple correlated input variables in a superior fashion than GLM will, and will not take as long as PROC GLM to compute all of these estimates.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2018 10:48:52 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-08-09T10:48:52Z</dc:date>
    <item>
      <title>Automatically select discrete/categorical variables for CLASS statement in PROC GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485328#M287124</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New SAS user here - attempting to do some linear regression on a large data set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand the basics of running PROC GLM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc glm data=dset plots=all; 
class b c; 
model y = a--d / solution;
run;&lt;/PRE&gt;&lt;P&gt;My problem is that the number of class variables is far too big to list out manually. The dataset contains about 100 variables and its split between continuous and discrete. Is there a way that SAS can determine which variable should belong in the CLASS statement on its own?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 01:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485328#M287124</guid>
      <dc:creator>bspan</dc:creator>
      <dc:date>2018-08-09T01:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically select discrete/categorical variables for CLASS statement in PROC GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485337#M287125</link>
      <description>&lt;P&gt;Yes, if your class variables are of type character, you can define a list like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;class v1-character-v100;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it will designate all character variables between v1 and v100, inclusive.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 03:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485337#M287125</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-08-09T03:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically select discrete/categorical variables for CLASS statement in PROC GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485400#M287126</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225406"&gt;@bspan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hey all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New SAS user here - attempting to do some linear regression on a large data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand the basics of running PROC GLM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc glm data=dset plots=all; 
class b c; 
model y = a--d / solution;
run;&lt;/PRE&gt;
&lt;P&gt;My problem is that the number of class variables is far too big to list out manually. The dataset contains about 100 variables and its split between continuous and discrete. Is there a way that SAS can determine which variable should belong in the CLASS statement on its own?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As stated by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;, you can indeed do this easily. However, I would advise against it as being a poor practice. If you have a lot of class variable levels in total, GLM will grind to a halt and take a very long time to compute the results. Furthermore, such results most likely will not be meaningful or useful as most of your 100 variables will be correlated with each other, causing additional estimation problems and interpretation problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A better approach would be to use PROC PLS on this data set, PLS handles the multiple correlated input variables in a superior fashion than GLM will, and will not take as long as PROC GLM to compute all of these estimates.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 10:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485400#M287126</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-09T10:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically select discrete/categorical variables for CLASS statement in PROC GLM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485434#M287127</link>
      <description>&lt;P&gt;I accepted&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;answer as the solution, but I will explore PROC PLS. Thanks for the insight!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 12:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-select-discrete-categorical-variables-for-CLASS/m-p/485434#M287127</guid>
      <dc:creator>bspan</dc:creator>
      <dc:date>2018-08-09T12:09:35Z</dc:date>
    </item>
  </channel>
</rss>

