<?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 PROC GEE Year Variable Coding Affects P-Values and Estimates in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GEE-Year-Variable-Coding-Affects-P-Values-and-Estimates/m-p/958997#M48035</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running a &lt;STRONG&gt;PROC GEE&lt;/STRONG&gt; model in SAS with a multinomial outcome&amp;nbsp; and using &lt;CODE&gt;year&lt;/CODE&gt; as a predictor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;SPAN&gt;PROC GEE DATA=data; CLASS id outcome(ref="2"); MODEL outcome = year / DIST=MULT LINK=GLOGIT; REPEATED SUBJECT=id/ TYPE=IND;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;SPAN&gt;RUN;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;When I use &lt;STRONG&gt;year as 2001, 2002, 2003, etc.&lt;/STRONG&gt;, the model does not provide &lt;STRONG&gt;p-values and Z statistics&lt;/STRONG&gt; for &lt;CODE&gt;year&lt;/CODE&gt;&amp;nbsp;but I get estimates.&lt;/P&gt;&lt;P&gt;However, when I recode &lt;CODE&gt;year&lt;/CODE&gt; as &lt;STRONG&gt;0, 1, 2, etc.&lt;/STRONG&gt;, firstly the estimates change, and now I also get &lt;STRONG&gt;p-values and Z statistics&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I expected that only the intercept would shift, but why does this affect significance testing? Is there something about scale or estimation in GEE that I should consider?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2025 02:30:24 GMT</pubDate>
    <dc:creator>Sara_p-value</dc:creator>
    <dc:date>2025-02-12T02:30:24Z</dc:date>
    <item>
      <title>PROC GEE Year Variable Coding Affects P-Values and Estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GEE-Year-Variable-Coding-Affects-P-Values-and-Estimates/m-p/958997#M48035</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running a &lt;STRONG&gt;PROC GEE&lt;/STRONG&gt; model in SAS with a multinomial outcome&amp;nbsp; and using &lt;CODE&gt;year&lt;/CODE&gt; as a predictor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;SPAN&gt;PROC GEE DATA=data; CLASS id outcome(ref="2"); MODEL outcome = year / DIST=MULT LINK=GLOGIT; REPEATED SUBJECT=id/ TYPE=IND;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;SPAN&gt;RUN;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;When I use &lt;STRONG&gt;year as 2001, 2002, 2003, etc.&lt;/STRONG&gt;, the model does not provide &lt;STRONG&gt;p-values and Z statistics&lt;/STRONG&gt; for &lt;CODE&gt;year&lt;/CODE&gt;&amp;nbsp;but I get estimates.&lt;/P&gt;&lt;P&gt;However, when I recode &lt;CODE&gt;year&lt;/CODE&gt; as &lt;STRONG&gt;0, 1, 2, etc.&lt;/STRONG&gt;, firstly the estimates change, and now I also get &lt;STRONG&gt;p-values and Z statistics&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I expected that only the intercept would shift, but why does this affect significance testing? Is there something about scale or estimation in GEE that I should consider?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 02:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GEE-Year-Variable-Coding-Affects-P-Values-and-Estimates/m-p/958997#M48035</guid>
      <dc:creator>Sara_p-value</dc:creator>
      <dc:date>2025-02-12T02:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GEE Year Variable Coding Affects P-Values and Estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GEE-Year-Variable-Coding-Affects-P-Values-and-Estimates/m-p/959005#M48036</link>
      <description>&lt;P&gt;1)Firstly,&amp;nbsp; If you could post some data to replicate your problem, that would be very helpful to address where is your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) I think you should code like this:&lt;/P&gt;
&lt;PRE&gt;CLASS id &lt;STRONG&gt;outcome(ref="2")&lt;/STRONG&gt;; 
MODEL outcome = year / DIST=MULT LINK=GLOGIT; 
-----&amp;gt;
CLASS id ; 
MODEL&lt;STRONG&gt; outcome(ref="2")&lt;/STRONG&gt; = year / DIST=MULT LINK=GLOGIT; &lt;/PRE&gt;
&lt;P&gt;3)About your question,that was supposed to be.&lt;/P&gt;
&lt;P&gt;Your YEAR variable is a continous varibable ,NOT category variable,&lt;/P&gt;
&lt;P&gt;so your YEAR variable is &lt;STRONG&gt;way too big&lt;/STRONG&gt; like:2002 2003, the estimate statistic from H0 is way too big,that lead to be unable to calculate P-value (the statistic is out of range of distribution).&lt;/P&gt;
&lt;P&gt;Take an example:&lt;/P&gt;
&lt;PRE&gt;data have;
set sashelp.heart;
/*ageatstart=ageatstart+20;*/
if mod(_n_,500)=1 then id+1;
run;


PROC GEE DATA=have;
CLASS id ;
MODEL bp_Status(ref='High') = ageatstart / DIST=MULT LINK=GLOGIT; 
REPEATED SUBJECT=id/ TYPE=IND; 
RUN;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1739331015910.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104555iB5F771747CE3D31D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1739331015910.png" alt="Ksharp_0-1739331015910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could take Z and P value.&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
set sashelp.heart;
&lt;STRONG&gt;ageatstart=ageatstart+200;  /*is too big*/&lt;/STRONG&gt;
if mod(_n_,500)=1 then id+1;
run;


PROC GEE DATA=have;
CLASS id ;
MODEL bp_Status(ref='High') = ageatstart / DIST=MULT LINK=GLOGIT; 
REPEATED SUBJECT=id/ TYPE=IND; 
RUN;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1739331097653.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104556i2811672ED9DA03D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1739331097653.png" alt="Ksharp_1-1739331097653.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Ageatstart is way too big to get Z and P value.&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
set sashelp.heart;
&lt;STRONG&gt;ageatstart=ageatstart+20;  /*is NOT too big*/&lt;/STRONG&gt;
if mod(_n_,500)=1 then id+1;
run;


PROC GEE DATA=have;
CLASS id ;
MODEL bp_Status(ref='High') = ageatstart / DIST=MULT LINK=GLOGIT; 
REPEATED SUBJECT=id/ TYPE=IND; 
RUN;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_2-1739331206987.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104557iE16018E545086965/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_2-1739331206987.png" alt="Ksharp_2-1739331206987.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Ageatstart is not too big ,so you can get Z and P value.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE: Z and P value is the same with the first one.&lt;/STRONG&gt;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you take Ageatstart as a category variable, you could get both of them whether it is 2002 or 2. and remain the same result.&lt;/P&gt;
&lt;PRE&gt;data have;
set sashelp.heart;
/*ageatstart=ageatstart+200;  */
if mod(_n_,500)=1 then id+1;
run;


PROC GEE DATA=have;
CLASS id &lt;STRONG&gt;ageatstart&lt;/STRONG&gt;;
MODEL bp_Status(ref='High') = ageatstart / DIST=MULT LINK=GLOGIT; 
REPEATED SUBJECT=id/ TYPE=IND; 
RUN;&lt;/PRE&gt;
&lt;PRE&gt;data have;
set sashelp.heart;
&lt;STRONG&gt;ageatstart=ageatstart+200;&lt;/STRONG&gt;  
if mod(_n_,500)=1 then id+1;
run;


PROC GEE DATA=have;
CLASS id &lt;STRONG&gt;ageatstart&lt;/STRONG&gt;;
MODEL bp_Status(ref='High') = ageatstart / DIST=MULT LINK=GLOGIT; 
REPEATED SUBJECT=id/ TYPE=IND; 
RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 03:38:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GEE-Year-Variable-Coding-Affects-P-Values-and-Estimates/m-p/959005#M48036</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-12T03:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GEE Year Variable Coding Affects P-Values and Estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GEE-Year-Variable-Coding-Affects-P-Values-and-Estimates/m-p/959036#M48039</link>
      <description>&lt;P class=""&gt;&amp;nbsp;I should have included my data structure in my original post - I'll make sure to do that next time.&lt;/P&gt;&lt;P class=""&gt;Thank you for your detailed and helpful response! Your explanation about the numerical computation issues with large year values really clarified my problem. I assume that&amp;nbsp;it would make more sense to use 0, 1, 2, 3 as year values then.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 14:11:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GEE-Year-Variable-Coding-Affects-P-Values-and-Estimates/m-p/959036#M48039</guid>
      <dc:creator>Sara_p-value</dc:creator>
      <dc:date>2025-02-12T14:11:02Z</dc:date>
    </item>
  </channel>
</rss>

