<?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 and Conditional logistic regression in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953577#M42864</link>
    <description>I think you can not integrate LASSO and CLR into one model. since LASSO is a variable pick-up method and is suited for GLM , while CLR is more like a Mixed model .&lt;BR /&gt;But you can run them separatedly:&lt;BR /&gt;For LASSO check PROC HPGENSELECT&lt;BR /&gt;For CLR check PROC LOGISTIC or PROC GLIMMIX .&lt;BR /&gt;Anywary maybe &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; or &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt; maybe know something.</description>
    <pubDate>Sat, 14 Dec 2024 07:54:09 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-12-14T07:54:09Z</dc:date>
    <item>
      <title>LASSO and Conditional logistic regression</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953541#M42863</link>
      <description>&lt;P&gt;Hi all, I need dataset to apply the LASSO and conditional logistic regression . if there is SAS program with the codes LASSO-CLR that will be awesome. for education purpose. I will be using this method&amp;nbsp; and would appreciate the help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked for sample data but did not find any..&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 18:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953541#M42863</guid>
      <dc:creator>Mofareh</dc:creator>
      <dc:date>2024-12-13T18:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: LASSO and Conditional logistic regression</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953577#M42864</link>
      <description>I think you can not integrate LASSO and CLR into one model. since LASSO is a variable pick-up method and is suited for GLM , while CLR is more like a Mixed model .&lt;BR /&gt;But you can run them separatedly:&lt;BR /&gt;For LASSO check PROC HPGENSELECT&lt;BR /&gt;For CLR check PROC LOGISTIC or PROC GLIMMIX .&lt;BR /&gt;Anywary maybe &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; or &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt; maybe know something.</description>
      <pubDate>Sat, 14 Dec 2024 07:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953577#M42864</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-14T07:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: LASSO and Conditional logistic regression</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953600#M42866</link>
      <description>&lt;P&gt;Thank you for your response, I appreciate the info.&amp;nbsp; Still looking for dataset to apply these methods.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 14 Dec 2024 23:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953600#M42866</guid>
      <dc:creator>Mofareh</dc:creator>
      <dc:date>2024-12-14T23:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: LASSO and Conditional logistic regression</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953605#M42867</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Maybe I found a workaround way to do this.&lt;/P&gt;
&lt;P&gt;Suppose you have data set:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Data1;
call streaminit(123);
do ID=1 to 63;
do Outcome = 1 to 0 by -1;
input Gall Hyper @@;
x1=rand('normal');
x2=rand('lognormal');
x3=rand('exponent',0.2);
x4=rand('gamma',1,2);
x5=rand('integer',1,200);
x6=rand('normal',1,2);
x7=rand('normal',2,3);
x8=rand('normal',3,4);
x9=rand('normal',4,5);
x10=rand('normal',5,6);
output;
end;
end;
datalines;
0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1
0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1
0 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 0
0 0 1 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0
0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1
0 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0
0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0
0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1
0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0
0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0
1 0 1 0 0 1 0 0 1 0 0 0
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;1) Get the design matrix with RANDOM effect by PROC GLIMMIX:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2016/02/24/create-a-design-matrix-in-sas.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2016/02/24/create-a-design-matrix-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc glimmix data=Data1 outdesign(names )=MixedDesign nofit;
class Gall Hyper;
model outcome(event='1')=Gall Hyper x1-x10/dist=binary;
random ID;
ods select ColumnNames;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1734229523807.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103016iAEE0CE6256004DB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1734229523807.png" alt="Ksharp_0-1734229523807.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Perform LASSO method via PROC HPGENSELECT:&lt;/P&gt;
&lt;P&gt;Any variable name start with "_X" and "_Z"&amp;nbsp; is from Design Matrix .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any variable name start with "_X" is fixed effect.&lt;/P&gt;
&lt;P&gt;Any variable name start with "_Z" is random effect.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc hpgenselect data=MixedDesign;
model outcome(event='1') = _x: _z:/ dist=binary;
selection method=Lasso(choose=SBC) details=all;
performance details;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1734231072358.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103018i605708713BA721B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1734231072358.png" alt="Ksharp_0-1734231072358.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;_X10&amp;nbsp; _X14&amp;nbsp; _X11&amp;nbsp; _X12&amp;nbsp; &lt;STRONG&gt;_X2&amp;nbsp;&lt;/STRONG&gt; _X6&amp;nbsp; _X9&amp;nbsp; &lt;STRONG&gt;_X4&lt;/STRONG&gt; entered model.&lt;/P&gt;
&lt;P&gt;NOTE: if any one ofvariables(&lt;STRONG&gt;_X2 _X3 _X4 _X5&lt;/STRONG&gt; are from category variable Gall and Hyper )&amp;nbsp; &amp;nbsp;entered model ,you need include these category variables in model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;_X10&amp;nbsp; _X14&amp;nbsp; _X11&amp;nbsp; _X12&amp;nbsp; _X2&amp;nbsp; _X6&amp;nbsp; _X9&amp;nbsp; _X4&lt;/P&gt;
&lt;P&gt;correspond to variables:&lt;/P&gt;
&lt;P&gt;Gall Hyper x5 x9 x6 x7 x1 x4&lt;/P&gt;
&lt;P&gt;So include these variables in next proc logistic.&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;
&lt;P&gt;3)Perform Condition Logistic Regression via PROC LOGISTIC.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc logistic data=Data1;
strata ID;
class Gall Hyper;
model outcome(event='1')=Gall Hyper x5 x9 x6 x7  x1 x4 ;
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;</description>
      <pubDate>Sun, 15 Dec 2024 02:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LASSO-and-Conditional-logistic-regression/m-p/953605#M42867</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-15T02:58:54Z</dc:date>
    </item>
  </channel>
</rss>

