<?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: lasso logistic regression control variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/887383#M43931</link>
    <description>&lt;P&gt;Can you provide SAS code. I'm getting errors when I add the include= statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on / LABELMAX=1900;&lt;/P&gt;&lt;P&gt;proc hpgenselect data=cs.analysis_final;&lt;BR /&gt;class Hispanic_includes_all_races IDU HCV;&lt;BR /&gt;model cs_case = Hispanic_includes_all_races IDU HCV;&lt;BR /&gt;selection method=lasso (stop=none choose=bic) details=all&lt;BR /&gt;include=Hispanic_includes_all_races;&lt;BR /&gt;/* bicplot / plotfit=yes; */&lt;BR /&gt;ods output Coefficients=lassocoef;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2023 20:14:07 GMT</pubDate>
    <dc:creator>Amyzlot1</dc:creator>
    <dc:date>2023-08-01T20:14:07Z</dc:date>
    <item>
      <title>lasso logistic regression control variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/856685#M42365</link>
      <description>&lt;P&gt;I am conducting a logistic regression on variables that were selected via LASSO (hpgenselect). I have a question about my methodology.&lt;/P&gt;&lt;P&gt;(1) If I want to control for age and gender, do I exclude them from the lasso selection but include them in the logistic regression? Or do I include them in both the lasso and logistic regression?&lt;/P&gt;&lt;P&gt;(2) Is it appropriate to use hpgenselect and follow up with logistic regression&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Thank you -&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 16:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/856685#M42365</guid>
      <dc:creator>Levi_M</dc:creator>
      <dc:date>2023-02-01T16:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: lasso logistic regression control variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/856688#M42367</link>
      <description>&lt;P&gt;Yes, you can use PROC HPGENSELECT with METHOD=LASSO in the SELECTION statement. Use the INCLUDE= option to specify the effects you want to keep in the model, for example INCLUDE=(AGE GENDER). If you want the final model to control for age and gender, then those variables need to be forced to stay in the model using the INCLUDE= option.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 17:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/856688#M42367</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-02-01T17:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: lasso logistic regression control variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/856718#M42372</link>
      <description>&lt;P&gt;thank you so much for your quick and informative response.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 19:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/856718#M42372</guid>
      <dc:creator>Levi_M</dc:creator>
      <dc:date>2023-02-01T19:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: lasso logistic regression control variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/887383#M43931</link>
      <description>&lt;P&gt;Can you provide SAS code. I'm getting errors when I add the include= statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on / LABELMAX=1900;&lt;/P&gt;&lt;P&gt;proc hpgenselect data=cs.analysis_final;&lt;BR /&gt;class Hispanic_includes_all_races IDU HCV;&lt;BR /&gt;model cs_case = Hispanic_includes_all_races IDU HCV;&lt;BR /&gt;selection method=lasso (stop=none choose=bic) details=all&lt;BR /&gt;include=Hispanic_includes_all_races;&lt;BR /&gt;/* bicplot / plotfit=yes; */&lt;BR /&gt;ods output Coefficients=lassocoef;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 20:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/887383#M43931</guid>
      <dc:creator>Amyzlot1</dc:creator>
      <dc:date>2023-08-01T20:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: lasso logistic regression control variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/887386#M43933</link>
      <description>The INCLUDE= option goes in the MODEL statement, not the SELECTION statement. See the HPGENSELECT documentation.</description>
      <pubDate>Tue, 01 Aug 2023 20:30:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/887386#M43933</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-08-01T20:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: lasso logistic regression control variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/887389#M43935</link>
      <description>&lt;P&gt;Thank you! This worked!&lt;/P&gt;&lt;P&gt;ods graphics on / LABELMAX=1900;&lt;/P&gt;&lt;P&gt;proc hpgenselect data=cs.analysis_final ;&lt;BR /&gt;class Hispanic_includes_all_races age_dich IDU HCV;&lt;BR /&gt;model cs_case (event=last) = Hispanic_includes_all_races age_dich IDU HCV / include= (Hispanic_includes_all_races age_dich) dist=binomial link=log;&lt;BR /&gt;selection method=lasso (stop=none choose=bic) details=all;&lt;BR /&gt;output out=Out xbeta predicted=Pred;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you generate r-squared statistics ang plots in&amp;nbsp;proc hpgenselect ? (I've checked the documentation but I'm not finding example code.) Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 21:14:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/lasso-logistic-regression-control-variables/m-p/887389#M43935</guid>
      <dc:creator>Amyzlot1</dc:creator>
      <dc:date>2023-08-01T21:14:57Z</dc:date>
    </item>
  </channel>
</rss>

