<?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: Trouble with BY-group processing using GLM parameterization in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959120#M48043</link>
    <description>&lt;P&gt;Does every value of&amp;nbsp;Replicate have the same set of values of&amp;nbsp;Smoker_NXT?&lt;/P&gt;
&lt;P&gt;Do any of the other analysis variables have missing values? PROC LOGISTIC should eliminate those observations.&amp;nbsp; Could that cause one of the values of Smoker_NXT to drop out for a group?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2025 23:11:32 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2025-02-12T23:11:32Z</dc:date>
    <item>
      <title>Trouble with BY-group processing using GLM parameterization</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959108#M48042</link>
      <description>&lt;P&gt;Greetings SASsers,&lt;/P&gt;&lt;P&gt;I am setting up a bootstrap analysis of a multinomial model in Proc Logistic and getting this warning:&lt;BR /&gt;&lt;STRONG&gt;WARNING: The current by-group is not processed because the ordering of the levels of Smoker_NXT are different from their ordering across all by-groups.&lt;/STRONG&gt;&lt;BR /&gt;which is unexpected because my data is sorted. My log file, lightly edited for brevity:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. &lt;BR /&gt;NOTE: SAS (r) Proprietary Software 9.4 (TS1M7) &lt;BR /&gt;Licensed to UNIVERSITY OF NEW MEXICO - ADMIN, Site 70080754.&lt;BR /&gt;NOTE: This session is executing on the X64_10PRO platform.&lt;BR /&gt;&lt;BR /&gt;2791       proc sort data=boots2;  by Replicate Smoker_NXT   ; 
2793       run;

NOTE: There were 243174 observations read from the data set WORK.BOOTS2.
&amp;#12;
2808       proc logistic data=boots2 order=formatted plots=none ;
2809       by Replicate;
2813       	class   Wave(ref='1')  AgeStartCIGS(ref='18-24')
2813     ! Age1stIview(ref='18-24') Sex(ref='Male')
2814       		Race(ref='White alone') Hispanic(ref='Non-Hispanic')
2815       		Smoker(ref='No') Smoker_NXT(ref='No') ENDSer(ref='No')
2816       		Start2SMK(ref='No')  SmkHistory(ref=first)  /  param=glm;
2817       
2818       	model Smoker_NXT =  AgeStartCIGS  Age1stIview Sex  Race  Hispanic	Wave|Smoker|ENDSer   SmkHistory   Start2SMK  /  noint
2819     ! link=glogit  Singular=1E-7  ;
2820       	weight tWGT ;
2829       run;

WARNING: The current by-group is not processed because the ordering of the 
         levels of Smoker_NXT are different from their ordering across all 
         by-groups.
NOTE: The above message was for the following BY group:
      Sample Replicate Number=1
NOTE: There were 243174 observations read from the data set WORK.BOOTS2.
NOTE: PROCEDURE LOGISTIC used (Total process time):&lt;/PRE&gt;&lt;P&gt;I get this warning for all By-Replicate groups, even for only a single group, but not if I remove the "BY Replicate;" statement.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sort data=boots2;  
by Replicate Smoker_NXT   ; 
run;

proc logistic data=boots2 &lt;STRONG&gt;order=data&lt;/STRONG&gt; plots=none ;
by Replicate;
class   Wave(ref='1')  AgeStartCIGS(ref='18-24') Age1stIview(ref='18-24') Sex(ref='Male')  Race(ref='White alone') Hispanic(ref='Non-Hispanic') Smoker(ref='No') Smoker_NXT(ref='No') ENDSer(ref='No') 		Start2SMK(ref='No')  SmkHistory(ref=first)  /  param=glm;
model Smoker_NXT = AgeStartCIGS Age1stIview Sex Race Hispanic Wave|Smoker|ENDSer SmkHistory Start2SMK  /  noint link=glogit  Singular=1E-7  ;
weight tWGT ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note1: "order=data" was suggested in one of the warning message, but it doesn't resolve the warning.&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Note2:&amp;nbsp;&lt;/STRONG&gt;The warning goes away if I switch from &lt;STRONG&gt;Param=GLM to Param=REF&lt;/STRONG&gt;, but I am hoping to use LSMEANS to get the interaction results.&lt;BR /&gt;&lt;BR /&gt;TIA!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 22:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959108#M48042</guid>
      <dc:creator>EastwoodDC42</dc:creator>
      <dc:date>2025-02-12T22:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with BY-group processing using GLM parameterization</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959120#M48043</link>
      <description>&lt;P&gt;Does every value of&amp;nbsp;Replicate have the same set of values of&amp;nbsp;Smoker_NXT?&lt;/P&gt;
&lt;P&gt;Do any of the other analysis variables have missing values? PROC LOGISTIC should eliminate those observations.&amp;nbsp; Could that cause one of the values of Smoker_NXT to drop out for a group?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 23:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959120#M48043</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-02-12T23:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with BY-group processing using GLM parameterization</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959135#M48044</link>
      <description>&lt;P&gt;1)&lt;/P&gt;
&lt;P&gt;Firstly, make sure in each of&amp;nbsp;Replicate, you have both No and Yes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a.k.a you have right data structure to build a LOGISTIC Model.&lt;/P&gt;
&lt;P&gt;Use this code to check:&lt;/P&gt;
&lt;PRE&gt;proc freq data=boots2 ;
table&amp;nbsp;Replicate*Smoker_NXT /list;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&lt;/P&gt;
&lt;P&gt;I think your code should like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;class   Wave(ref='1')  AgeStartCIGS(ref='18-24') Age1stIview(ref='18-24') Sex(ref='Male')  &lt;BR /&gt;Race(ref='White alone') Hispanic(ref='Non-Hispanic') Smoker(ref='No') &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Smoker_NXT(ref='No')&lt;/STRONG&gt;&lt;/FONT&gt; &lt;BR /&gt;ENDSer(ref='No') 		Start2SMK(ref='No')  SmkHistory(ref=first)  /  param=glm;
model Smoker_NXT = AgeStartCIGS Age1stIview Sex Race Hispanic Wave|Smoker|ENDSer SmkHistory &lt;BR /&gt;Start2SMK  /  noint link=glogit  Singular=1E-7  ;

-----&amp;gt;

class   Wave(ref='1')  AgeStartCIGS(ref='18-24') Age1stIview(ref='18-24') Sex(ref='Male') &lt;BR /&gt;Race(ref='White alone') Hispanic(ref='Non-Hispanic') Smoker(ref='No')  &lt;BR /&gt;ENDSer(ref='No') 		Start2SMK(ref='No')  SmkHistory(ref=first)  /  param=glm;
model &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Smoker_NXT(ref='No')&lt;/STRONG&gt;&lt;/FONT&gt; = AgeStartCIGS Age1stIview Sex Race Hispanic Wave|Smoker|ENDSer SmkHistory&lt;BR /&gt;Start2SMK  /  noint link=glogit  Singular=1E-7  ;&lt;/PRE&gt;
&lt;P&gt;NOTE: there is not Smoker_NXT in CLASS statement.&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;If that still does not work, try using another level of Smoker_NXT( ref='Yes'):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;class   Wave(ref='1')  AgeStartCIGS(ref='18-24') Age1stIview(ref='18-24') Sex(ref='Male') 
Race(ref='White alone') Hispanic(ref='Non-Hispanic') Smoker(ref='No')  
ENDSer(ref='No') 		Start2SMK(ref='No')  SmkHistory(ref=first)  /  param=glm;
model &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Smoker_NXT(ref='Yes')&lt;/STRONG&gt;&lt;/FONT&gt; = AgeStartCIGS Age1stIview Sex Race Hispanic Wave|Smoker|ENDSer SmkHistory
Start2SMK  /  noint link=glogit  Singular=1E-7  &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>Thu, 13 Feb 2025 02:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959135#M48044</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-13T02:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with BY-group processing using GLM parameterization</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959200#M48047</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Does every value of&amp;nbsp;Replicate have the same set of values of&amp;nbsp;Smoker_NXT?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;They do. I suspect some interaction between the glogit link and by-processing.&lt;BR /&gt;&lt;BR /&gt;Each subject might be surveyed up to 7 times, and the third level of response is "No Response" to the survey. On consideration I can drop the non-response and simplify to a logistic regression.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your time!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 17:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959200#M48047</guid>
      <dc:creator>EastwoodDC42</dc:creator>
      <dc:date>2025-02-13T17:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with BY-group processing using GLM parameterization</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959206#M48048</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You suggestion of removing Smoker_NXT from the CLASS statement appears to have resolved the level-ordering problem (Hurray!), but now I have convergence issues. As I noted to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;above, I can simplify the model, which might solve the convergence problems too.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks again for your time!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 17:44:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Trouble-with-BY-group-processing-using-GLM-parameterization/m-p/959206#M48048</guid>
      <dc:creator>EastwoodDC42</dc:creator>
      <dc:date>2025-02-13T17:44:25Z</dc:date>
    </item>
  </channel>
</rss>

