<?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: feature (lasso) selection and parameter's p-value in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333796#M62853</link>
    <description>&lt;P&gt;Ok so that's slightly different than the way we use it because you're getting the ODS table (which I didn't do originally because I didn't think of it). Do the parameter estimates get printed to your output screen?&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2017 15:08:00 GMT</pubDate>
    <dc:creator>cau83</dc:creator>
    <dc:date>2017-02-17T15:08:00Z</dc:date>
    <item>
      <title>feature (lasso) selection and parameter's p-value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333713#M62848</link>
      <description>&lt;P&gt;If I use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/selection=none stb showpvalues;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as option for proc glmselect I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Effect Parameter DF Estimate StandardizedEst StdErr tValue Probt&lt;BR /&gt;Intercept Intercept 1 9.985494 0 0.269958 36.99 &amp;lt;.0001&lt;BR /&gt;Bla Bla 1 -4.941651 -0.877694553 0.129965 -38.02 &amp;lt;.0001&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where&amp;nbsp;&lt;SPAN&gt;Probt is a parameter's p-value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, if I use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/selection=lasso(stop=none choose=sbc) showpvalues;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I do not get any p-values for the parameters. Can I obtain them?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 09:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333713#M62848</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-02-17T09:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: feature (lasso) selection and parameter's p-value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333780#M62851</link>
      <description>&lt;P&gt;That doesn't seem right. What if you use BACKWARD/FORWARD/STEPWISE selection?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you getting the output from the LISTING output?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We use GLMSELECT with those other selection methods, but we have tested LASSO. I didn't do it personally but no one said that they didn't get the normal output so I don't believe that's a "feature." We generally write the output out to a text file with PROC PRINTTO and then read it back in so that we can have it in a dataset-- but I'm 100% that when we don't, we are able to see the parameter estimate table at each iteration of selection (with the details option on).&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 14:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333780#M62851</guid>
      <dc:creator>cau83</dc:creator>
      <dc:date>2017-02-17T14:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: feature (lasso) selection and parameter's p-value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333792#M62852</link>
      <description>&lt;P&gt;Mmhh. I am using:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GLMSELECT data=bla.dibla;
model Y
=
....
/selection=lasso(stop=none choose=sbc);
ods output
ParameterEstimates = ParameterEstimates
"Fit Statistics" = WORK.Model_Fit;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;and ParameterEstimates does not contain the p values in the case of lasso ...&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 14:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333792#M62852</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-02-17T14:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: feature (lasso) selection and parameter's p-value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333796#M62853</link>
      <description>&lt;P&gt;Ok so that's slightly different than the way we use it because you're getting the ODS table (which I didn't do originally because I didn't think of it). Do the parameter estimates get printed to your output screen?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333796#M62853</guid>
      <dc:creator>cau83</dc:creator>
      <dc:date>2017-02-17T15:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: feature (lasso) selection and parameter's p-value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333844#M62856</link>
      <description>In my use case it would not work as the parameters are extracted from ParameterEstimates as I fit 100s of models ...</description>
      <pubDate>Fri, 17 Feb 2017 17:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333844#M62856</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-02-17T17:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: feature (lasso) selection and parameter's p-value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333892#M62859</link>
      <description>&lt;P&gt;If you don't end up getting it through the ODS table, I'd contact SAS tech support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That being said, I'll copy in the code we use for writing the GLMSELECT results to a text file, and read it back in and parse out the estimates. It would save you time if you need to go that route. We use this to build 2&amp;nbsp;tables - the parameter estimates and the goodness of fit statistics + holdout sample error (which we use as our selection criteria).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Earlier, i've specificed proc printto and my glm select and then closed the printto.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data modeloutput parms modelstats;&lt;BR /&gt; infile "output.txt" firstobs= 1 lrecl=32767 truncover;&lt;BR /&gt; attrib SAS_OUTPUT length = $250 txn_name length = $50;&lt;BR /&gt; input SAS_OUTPUT 1 - 250;&lt;BR /&gt; sas_output=compress(sas_output,,'c'); *removes the form feed character that shows page breaks, which interferes with logic below;&lt;BR /&gt; output modeloutput; &lt;BR /&gt; retain txn_Name parmtable_f;&lt;BR /&gt; if substr(sas_output,1,3) = "---" then txn_name=strip(tranwrd(substr(sas_output,index(upcase(sas_output),"NEW_SKILL_NAME")+15,50),'-',''));&lt;BR /&gt; if substr(sas_output,1,11) = "Parameter E" then parmtable_f = 1;&lt;BR /&gt; *everything after this point will have a 1**;&lt;BR /&gt; if substr(sas_output,1,3) = "---" then parmtable_f = 0;&lt;BR /&gt; *at the end of the table, switch value back to zero;&lt;BR /&gt;&lt;BR /&gt; *now, output all of the parameter estimates to a separate data set;&lt;BR /&gt; if parmtable_f = 1 then output parms;&lt;BR /&gt; else if substr(sas_output,1,8) = "Adj R-Sq"&lt;BR /&gt; or substr(sas_output,1,3) = "AIC"&lt;BR /&gt; or substr(sas_output,1,3) = "SBC"&lt;BR /&gt; or substr(sas_output,1,3) = "ASE"&lt;BR /&gt; or find(sas_output,"Number of Observations")=1&lt;BR /&gt; then output modelstats;&lt;BR /&gt; drop parmtable_f;&lt;BR /&gt;run;&lt;BR /&gt;data modelstats2(drop=sas_output);&lt;BR /&gt; set modelstats;&lt;BR /&gt; metric_name = substr(sas_output,1,find(sas_output," "));&lt;BR /&gt; metric_value=compbl(substr(sas_output,find(sas_output," "),50))*1;&lt;BR /&gt;run;&lt;BR /&gt;data parms2(drop=sas_output p_value2 where=(parameter is not missing));&lt;BR /&gt; attrib txn_name parameter class_value length=$50 &lt;BR /&gt; DF Estimate Std_Error T_Score P_value format=best12. &lt;BR /&gt; p_value2 length=$10;&lt;BR /&gt; set parms;&lt;BR /&gt; if substr(sas_output,1,9) = "Parameter" then delete;&lt;BR /&gt; if substr(sas_output,1,5) = " " then delete;&lt;BR /&gt; if substr(sas_output,1,1)="*" then sas_output=substr(sas_output,3,length(sas_output)-2);&lt;BR /&gt; *Non-classification variables;&lt;BR /&gt; if scan(sas_output,1," ")="Intercept" or scan(sas_output,1," ")="Weektrend" then do;&lt;BR /&gt; parameter=scan(sas_output,1," ");&lt;BR /&gt; class_value="";&lt;BR /&gt; DF=scan(sas_output,2," ")*1;&lt;BR /&gt; Estimate=scan(sas_output,3," ")*1;&lt;BR /&gt; Std_Error=scan(sas_output,4," ")*1;&lt;BR /&gt; T_Score=scan(sas_output,5," ")*1;&lt;BR /&gt; P_Value2=scan(sas_output,6," ");&lt;BR /&gt; end;&lt;BR /&gt; *Classification variables;&lt;BR /&gt; else do;&lt;BR /&gt; parameter=scan(sas_output,1," ");&lt;BR /&gt; class_value=scan(sas_output,2," ");&lt;BR /&gt; DF=scan(sas_output,3," ")*1;&lt;BR /&gt; Estimate=scan(sas_output,4," ")*1;&lt;BR /&gt; Std_Error=scan(sas_output,5," ")*1;&lt;BR /&gt; T_Score=scan(sas_output,6," ")*1;&lt;BR /&gt; P_Value2=scan(sas_output,7," ");&lt;BR /&gt; end;&lt;BR /&gt;&lt;BR /&gt; if p_value2="&amp;lt;.0001" then p_value=.0001;&lt;BR /&gt; else p_value=p_value2*1;&lt;BR /&gt;&lt;BR /&gt; if estimate=. then delete;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/feature-lasso-selection-and-parameter-s-p-value/m-p/333892#M62859</guid>
      <dc:creator>cau83</dc:creator>
      <dc:date>2017-02-17T18:59:56Z</dc:date>
    </item>
  </channel>
</rss>

