<?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 GLMSelect and confidence intervals in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327562#M17282</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34787"&gt;@cau83&lt;/a&gt;&amp;nbsp;: I may not fully understand the complexity of your process, but I wonder whether any of your processes could be simplified by using the STORE statement in PROC GLMSELECT? PROC PLM produces a 'Store Information' table that contains the class variables(s) and model effects:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one(drop=i j);
   array x{5} x1-x5;
   do i=1 to 1000;
      classVar = mod(i,4)+1;  
      do j=1 to 5;
         x{j} = ranuni(1);
      end;   
      y     = 3*classVar+7*x2+5*x2*x5+rannor(1);
      output;
   end;
run;
proc glmselect data=one;
   class  classVar;
   model  y = classVar x1|x2|x3|x4|x5 @2 /
                  selection=stepwise(stop=aicc);
   store out=glmselectStore;  /* STORE the model */
run;

proc plm restore=glmselectStore;
show ClassLevels Parameters;
score data=one(obs=3)  /* use PROC PLM to score the model */
      out=Score;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 Jan 2017 22:16:06 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-01-25T22:16:06Z</dc:date>
    <item>
      <title>Proc GLMSelect and confidence intervals</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/326727#M17257</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering if I am correct in my finding that I can't produce confidence intervals in the results output window when I use proc glmselect for a regression. I know it is typical procedure to post a question with data and code etc. but I don't really know where to start with this question. The only work around I have thought about is to use proc glmselect to grab variable names and output it to a data set, then write a macro variable that gets filtered into a proc glm command with the clm option specified after the model statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be great thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/326727#M17257</guid>
      <dc:creator>jacob_klimek</dc:creator>
      <dc:date>2017-01-23T15:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLMSelect and confidence intervals</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/326748#M17258</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glmselect_overview.htm" target="_self"&gt;As stated in the documentation&lt;/A&gt;, "PROC GLMSELECT provides results (displayed tables, output data sets, and macro variables) that make it easy to take the selected model and explore it in more detail in a subsequent procedure such as REG or GLM." &amp;nbsp;However, to get inferential statistics and hypotheses tests, you should select a model and then use a procedure such as PROC GLM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need to create your own macro variables because PROC GLMSELECT already provides one.&lt;/P&gt;
&lt;P&gt;See the section "Macro variables containing selected models" for an example of using macro variables for post-selection analysis. &amp;nbsp;In particular, after you run PROC GLMSELECT, you can use the&amp;nbsp;_GLSIND macro variable to run the selected model in PROC GLM, as shown in this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glmselect data=sashelp.cars;
class origin;
model mpg_city = MSRP|wheelbase|weight|cylinders|origin @2;
run;

%put &amp;amp;=_GLSIND;

proc glm data=sashelp.cars;
class origin;
model mpg_city = &amp;amp;_GLSIND / solution CLPARM; /* or CLB for PROC REG */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/326748#M17258</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-23T15:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLMSelect and confidence intervals</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327553#M17281</link>
      <description>&lt;P&gt;We use GLMSelect along with GLM in a 3 step process where we want to quickly do some budget planning across a couple hundred different transaction types:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) GLMSelect is used so that SAS can take our list of potential independent variables and do some model specification for us (we use a holdout sample and the error against the holdout sample is the selection criteria). We then put these specifications in a spreadsheet by writing the listing output to a text file, and have an excel macro that parses this out to build a table with the specification for each transaction (eg, the CLASS and MODEL statements).&lt;/P&gt;
&lt;P&gt;2) We use GLMSelect again, pulling in the spreadsheet and looping through each specification so that we get all of our holdout sample results in one place (we produce charts and some tables with the accuracy against the out-of-sample data).&lt;/P&gt;
&lt;P&gt;3) Finally, we use GLM. We again pull in the model specification using the spreadsheet like step 2. However, now we use all of our data (up to today) rather than have a holdout sample; and, we are able to generate the confidence interval bounds along with the final forecast.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 21:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327553#M17281</guid>
      <dc:creator>cau83</dc:creator>
      <dc:date>2017-01-25T21:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLMSelect and confidence intervals</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327562#M17282</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34787"&gt;@cau83&lt;/a&gt;&amp;nbsp;: I may not fully understand the complexity of your process, but I wonder whether any of your processes could be simplified by using the STORE statement in PROC GLMSELECT? PROC PLM produces a 'Store Information' table that contains the class variables(s) and model effects:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one(drop=i j);
   array x{5} x1-x5;
   do i=1 to 1000;
      classVar = mod(i,4)+1;  
      do j=1 to 5;
         x{j} = ranuni(1);
      end;   
      y     = 3*classVar+7*x2+5*x2*x5+rannor(1);
      output;
   end;
run;
proc glmselect data=one;
   class  classVar;
   model  y = classVar x1|x2|x3|x4|x5 @2 /
                  selection=stepwise(stop=aicc);
   store out=glmselectStore;  /* STORE the model */
run;

proc plm restore=glmselectStore;
show ClassLevels Parameters;
score data=one(obs=3)  /* use PROC PLM to score the model */
      out=Score;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Jan 2017 22:16:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327562#M17282</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-25T22:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLMSelect and confidence intervals</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327709#M17293</link>
      <description>&lt;P&gt;Thanks Rick. I was generally aware of the existence of this kind of functionality, and perhaps it's something to explore as we prepare this year. That being said, we do not always use the GLMSELECT specifications w/o manual change-- for instance, certain parameters (like # of business days in a week, 4 or 5) should only be positive or negative and we would remove it if is wrong if it increases the holdout sample error. Using GLMSELECT as well as the listing output/excel helps to remove friction from a process that we want to be fast because it is serving as the starting point for management rather than the end point (and we spend a lot more time on the business side of things after it's done).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your original answer may be an easier way to generate the list than using the listing output and excel-- do the automatic macro variables work with a BY statement? Or at least separate with a delimiter and we could match back up?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 13:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327709#M17293</guid>
      <dc:creator>cau83</dc:creator>
      <dc:date>2017-01-26T13:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLMSelect and confidence intervals</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327711#M17294</link>
      <description>Great thanks this is more or less what I was looking for.</description>
      <pubDate>Thu, 26 Jan 2017 13:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327711#M17294</guid>
      <dc:creator>jacob_klimek</dc:creator>
      <dc:date>2017-01-26T13:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLMSelect and confidence intervals</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327736#M17295</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;do the automatic macro variables work with a BY statement?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, and there is an example in the doc.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 14:43:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLMSelect-and-confidence-intervals/m-p/327736#M17295</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-26T14:43:45Z</dc:date>
    </item>
  </channel>
</rss>

