<?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: Application Lasso in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718409#M34725</link>
    <description>&lt;P&gt;Thank you a lot for the answer.&lt;/P&gt;&lt;P&gt;Unfortunaly Iam not allowed to share the data set because of data protection.&lt;/P&gt;&lt;P&gt;Most time when sas tells me that all variables should stay in the model, the result is identical to OLS (PROC Reg), and so everything is fine. Only in some cases this is not the case and I noticed that in these cases variables are stayed in the model where the coefficient is zero. So SAS tells me I should keep the variable (it is not excluded from the Output "Paramter estimates") but the value is zero. This is very confusing to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 21:23:32 GMT</pubDate>
    <dc:creator>DomUk</dc:creator>
    <dc:date>2021-02-10T21:23:32Z</dc:date>
    <item>
      <title>Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/717738#M34707</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have two questions regarding the application of Lasso, using the cross validation method (cvex).&lt;/P&gt;&lt;P&gt;In my case, I run pooled cross-sectional rolling regressions, using 5 years of data, to forecast Earnings with 12 variables.&lt;/P&gt;&lt;P&gt;In order to check if all variables are relevant, I use the lasso statement for each single regression of the rolling window (together 27 regressions, 1992-2018). For example to estimate the coefficients for year 2011 the following code is used:&lt;/P&gt;&lt;P&gt;proc glmselect data=mylib.earning plots=all seed=123;&lt;BR /&gt;where 2007&amp;lt;= Year &amp;lt;=2011;&lt;BR /&gt;model Earning(t+1)= x1(t)+...+ x12(t)&lt;BR /&gt;/selection=LASSO (stop=none choose=cvex);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For most of the 27 regressions, all variables keep in the model, but sometimes the coefficients are different from the OLS-Regression. Should the coefficients not be equal to the OLS-solution, because there is no penalty?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Very often, some coefficents in the lasso-output are zero, but they are not excluded from the model. So the variables are listed in the output (parameter estimates), but they have the value zero. Why are these variables not excluded from the model?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for an answer.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Dom&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 20:52:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/717738#M34707</guid>
      <dc:creator>DomUk</dc:creator>
      <dc:date>2021-02-08T20:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718388#M34724</link>
      <description>&lt;P&gt;Dom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you provide data set so we can take a closer look at your application with the results you reported?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would expect as all the variables enter into the model&amp;nbsp; and in this case, the output of LASSO reduces to OLS, as, t, the parameter in the LASSO formulation (see the doc for GLMSELECT), can be thought as infinity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I attached&amp;nbsp;code that&amp;nbsp;simulates a data set where are the variables enter in model and LASSO estimates reduce to the OLS estimates.&lt;/P&gt;
&lt;DIV id="tinyMceEditorSTAT_Kathleen_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 20:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718388#M34724</guid>
      <dc:creator>STAT_Kathleen</dc:creator>
      <dc:date>2021-02-10T20:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718409#M34725</link>
      <description>&lt;P&gt;Thank you a lot for the answer.&lt;/P&gt;&lt;P&gt;Unfortunaly Iam not allowed to share the data set because of data protection.&lt;/P&gt;&lt;P&gt;Most time when sas tells me that all variables should stay in the model, the result is identical to OLS (PROC Reg), and so everything is fine. Only in some cases this is not the case and I noticed that in these cases variables are stayed in the model where the coefficient is zero. So SAS tells me I should keep the variable (it is not excluded from the Output "Paramter estimates") but the value is zero. This is very confusing to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 21:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718409#M34725</guid>
      <dc:creator>DomUk</dc:creator>
      <dc:date>2021-02-10T21:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718517#M34743</link>
      <description>&lt;P&gt;Here is the output and my code. Maybe this is helpful.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 09:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718517#M34743</guid>
      <dc:creator>DomUk</dc:creator>
      <dc:date>2021-02-11T09:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718592#M34753</link>
      <description>&lt;P&gt;This note could be extremely useful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/60/240.html" target="_self"&gt;https://support.sas.com/kb/60/240.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It shows what to do with the zero values obtained for parameters under LASSO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718592#M34753</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-02-11T14:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718735#M34775</link>
      <description>&lt;P&gt;Tank you for the answer but which part do you concrete mean? I find no information that fit to my problem&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 20:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/718735#M34775</guid>
      <dc:creator>DomUk</dc:creator>
      <dc:date>2021-02-11T20:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/720007#M34851</link>
      <description>&lt;P&gt;I have been able to replicate the behavior of zero&amp;nbsp;coefficient included in the final model using LASSO selection.&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; font-size: 12pt;"&gt;&lt;FONT color="#000000"&gt;In my statistical opinion, if the zero coefficients appear in the intermediate steps, it would be quite reasonable and okay. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; font-size: 12pt;"&gt;&lt;FONT color="#000000"&gt;However, there should be no zero coefficients in the final selected model. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in;"&gt;&lt;SPAN style="font-family: 'Arial',sans-serif; font-size: 12pt;"&gt;&lt;FONT color="#000000"&gt;I have informed our developers of this particular behavior and we are currently researching this particular issue. I will update you once I have more specific details.&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 18:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/720007#M34851</guid>
      <dc:creator>STAT_Kathleen</dc:creator>
      <dc:date>2021-02-17T18:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/720860#M34900</link>
      <description>thank you very much!</description>
      <pubDate>Mon, 22 Feb 2021 09:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/720860#M34900</guid>
      <dc:creator>DomUk</dc:creator>
      <dc:date>2021-02-22T09:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Application Lasso</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/730813#M35444</link>
      <description>&lt;P&gt;Hi Kathleen,&lt;/P&gt;&lt;P&gt;I have one more question:&lt;/P&gt;&lt;P&gt;i would like to use lasso application to exclude not important variables.&lt;/P&gt;&lt;P&gt;concrete, I would like to run the regression on 5 years on data (2000-2004) and validate it on the year 2005. My dataset contains years from 1980-2020, so do you have an idea how i could handle this? I tried to safe all data from 2005 in a new dataset, but it doesnt work. I think the starting point is something like this&lt;/P&gt;&lt;P&gt;proc glmselect data=mylib. dataset plots=all seed=123 valdata= ??? ;&lt;BR /&gt;where 2000 &amp;lt;= year &amp;lt;= 2004 ;&lt;BR /&gt;model y= x1........x100&lt;BR /&gt;/selection= lasso (stop=none choose=validate);&lt;BR /&gt;ods output parameterestimates= check_lasso_parms;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for an answer&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 19:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Application-Lasso/m-p/730813#M35444</guid>
      <dc:creator>DomUk</dc:creator>
      <dc:date>2021-04-01T19:09:12Z</dc:date>
    </item>
  </channel>
</rss>

