<?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: Non-normal data; PROC GLIMMIX in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840876#M332481</link>
    <description>&lt;P&gt;First, I want to support what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;said about residuals being normally distributed. For the non-Gaussian distributions you were examining, the check on normality in the residuals isn't as necessary, but it does let you know if the variance components are normally distributed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some other things to note: It appears the response variable is a count, which would imply that a Poisson&amp;nbsp; or negative binomial distribution is a likely candidate, unless the counts get quite large, where the gamma treats the discrete values as continuous. No need to check binomial or beta, as they only have support on the zero to one interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at your code, I don't see an NLOPTIONS statement.&amp;nbsp; Many times for Poisson or negative binomial, you are going to need more than the default 20 iterations to get convergence. We routinely use NLOPTIONS=5000. The rest of the code looks like it should give you comparisons between the levels of Trmt at each Week, so I am a bit confused that the gamma distribution approach did not give you all of the lsmeans.&amp;nbsp; Check the output for any messages that may be printed, as well as for WARNINGs or NOTEs in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more thing to consider is a generalized estimating equation approach using PROC GEE. Your current code is fitting a marginal model in GLIMMIX, so switching to PROC GEE (or GENMOD for a wider selection of possible distributions) may solve your problems. Note that the LSMEANS statement in GEE doesn't support the slicediff= option. LSMESTIMATE or SLICE statements should give you the specific within week comparisons you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 13:38:48 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2022-10-26T13:38:48Z</dc:date>
    <item>
      <title>Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840753#M332428</link>
      <description>&lt;P&gt;Want to evaluate difference between survival of larvae on different feed types. There are 3 feed types, 8 blocks and survival (alive) was measured once a week for 8 weeks (Repeated measures).&amp;nbsp;When I originally ran my data I failed to meet the assumptions for normality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data WholeP;&lt;BR /&gt;Infile datalines dlm="09"x;&lt;BR /&gt;input Week Trmt Block Alive;&lt;BR /&gt;datalines;&lt;BR /&gt;0 1 1 10&lt;BR /&gt;0 1 2 10&lt;/P&gt;&lt;P&gt;...;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc glimmix data=WholeP;&lt;BR /&gt;class Block Week Trmt;&lt;BR /&gt;model Alive = Trmt|Week / ddfm=kr;&lt;BR /&gt;random Week / subject= Block type=cs residual;&lt;BR /&gt;lsmeans Trmt*Week / slicediff=Week adjust=tukey lines;&lt;BR /&gt;output out=second predicted=pred residual=resid residual(noblup)=mresid student=studentresid student(noblup)=smresid;&lt;BR /&gt;ods output lsmeans=lsdata;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BUGstats_0-1666766585131.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76621iDBF91F1EE88B97BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BUGstats_0-1666766585131.png" alt="BUGstats_0-1666766585131.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried to log transform my data but NOTHING has increased the Shapiro value and others do not converge.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc glimmix data=WholeP;&lt;BR /&gt;class Block Week Trmt;&lt;BR /&gt;model Alive = Trmt|Week / dist =gamma link=log ddfm=kr;&lt;BR /&gt;*/- did not got results with dist = negbn;&lt;BR /&gt;*/- did not got results with dist = binomial;&lt;BR /&gt;*/- did not got results with dist = poisson;&lt;BR /&gt;*/- did not got results with dist = beta;&lt;BR /&gt;*/- got results with dist = gamma but LSMEANS lines not fully complete;&lt;BR /&gt;random Week / subject= Block type=cs residual;&lt;BR /&gt;output out=second predicted=pred residual=resid residual(noblup)=mresid student=studentresid student(noblup)=smresid;&lt;BR /&gt;lsmeans Trmt*Week / ilink slicediff=Week adjust=tukey lines;&lt;BR /&gt;ods output lsmeans=lsdata;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to see if there is a statistical significance between feed types at week 8 for example. I am out of ideas on how to transform the data to meet the assumptions for normality. Is there something in my code I can change or try?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 06:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840753#M332428</guid>
      <dc:creator>BUGstats</dc:creator>
      <dc:date>2022-10-26T06:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840787#M332439</link>
      <description>&lt;P&gt;Data does not have to be normally distributed to fit a linear regression model&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read: &lt;A href="https://blogs.sas.com/content/iml/2018/08/27/on-the-assumptions-and-misconceptions-of-linear-regression.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/08/27/on-the-assumptions-and-misconceptions-of-linear-regression.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are the residuals normally distributed?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 10:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840787#M332439</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-26T10:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840843#M332466</link>
      <description>Calling  &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;  &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt;</description>
      <pubDate>Wed, 26 Oct 2022 12:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840843#M332466</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-26T12:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840874#M332480</link>
      <description>&lt;P&gt;It looks like the ALIVE variable is the number of larvae that survived. This is a count variable, not a continuous variable. The rejection of the normality assumption is because your response is discrete, not continuous.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to Google "how to model count data."&amp;nbsp; Your model assumes that the response variable is continuous, but it is not.&amp;nbsp; There are special models you can use for count data. You might want to start by reading the &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_glimmix_examples01.htm" target="_self"&gt;example in the GLIMMIX documentation for binomial data.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 13:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840874#M332480</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-10-26T13:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840876#M332481</link>
      <description>&lt;P&gt;First, I want to support what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;said about residuals being normally distributed. For the non-Gaussian distributions you were examining, the check on normality in the residuals isn't as necessary, but it does let you know if the variance components are normally distributed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some other things to note: It appears the response variable is a count, which would imply that a Poisson&amp;nbsp; or negative binomial distribution is a likely candidate, unless the counts get quite large, where the gamma treats the discrete values as continuous. No need to check binomial or beta, as they only have support on the zero to one interval.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at your code, I don't see an NLOPTIONS statement.&amp;nbsp; Many times for Poisson or negative binomial, you are going to need more than the default 20 iterations to get convergence. We routinely use NLOPTIONS=5000. The rest of the code looks like it should give you comparisons between the levels of Trmt at each Week, so I am a bit confused that the gamma distribution approach did not give you all of the lsmeans.&amp;nbsp; Check the output for any messages that may be printed, as well as for WARNINGs or NOTEs in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more thing to consider is a generalized estimating equation approach using PROC GEE. Your current code is fitting a marginal model in GLIMMIX, so switching to PROC GEE (or GENMOD for a wider selection of possible distributions) may solve your problems. Note that the LSMEANS statement in GEE doesn't support the slicediff= option. LSMESTIMATE or SLICE statements should give you the specific within week comparisons you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 13:38:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840876#M332481</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-10-26T13:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840891#M332483</link>
      <description>&lt;P&gt;Hi PaigeMiller,&lt;/P&gt;&lt;P&gt;Sorry for confusion when I say something has failed normality I am always referring to the residuals.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 13:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840891#M332483</guid>
      <dc:creator>BUGstats</dc:creator>
      <dc:date>2022-10-26T13:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840919#M332488</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;GREAT answer. As I clarified with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;I meant that the residuals failed normality. I too have looked at poisson transformation but it does not converge. I have provided my entire code (Note the full data can be found in the attached text file) and the entire log output below. I haven't been able to evaluate any LSmeans with transformed data. Additionally, I am unfamiliar with where in the code to add the NLOPTIONS statement. I did some quick reading and one source said GLIMMIX would ignore a NLOPTIONS statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*/Note the variable Week should really say Day;&lt;BR /&gt;Data WholeP;&lt;BR /&gt;Infile datalines dlm="09"x;&lt;BR /&gt;input Week Trmt Block Alive;&lt;BR /&gt;datalines;&lt;BR /&gt;0 1 1 10&lt;BR /&gt;0 1 2 10&lt;BR /&gt;0 1 3 10&lt;BR /&gt;...&lt;BR /&gt;;&lt;BR /&gt;Run;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Proc glimmix data=WholeP;
class Block Week Trmt;
model Alive = Trmt|Week / dist =poisson link=log ddfm=kr;
random Week / subject= Block type=cs residual;
  output out=second predicted=pred residual=resid residual(noblup)=mresid student=studentresid student(noblup)=smresid;
  lsmeans Trmt*Week / ilink slicediff=Trmt adjust=tukey lines;
  ods output lsmeans=lsdata;
run;

*/ need to check model assumptions before moving forward;
/*  Linearity of fixed effects - both as a scatter and a boxplot */
Proc sgplot data=second;
  vbox smresid / group=Trmt datalabel;
Run;

Proc sgplot data=second;
  vbox smresid / group=Week datalabel;
Run;

/* Homogeneity of effects */
Proc sgscatter data=second;
  plot studentresid*(pred Trmt Week);
Run;

/* Q-Q plot and Shapiro-Wilk for normal distribution */
Proc univariate data=second normal plot;
  var studentresid;
  histogram studentresid / normal kernel;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BUGstats_1-1666794075093.png" style="width: 408px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76651i57B11087DB3ECE47/image-dimensions/408x958?v=v2" width="408" height="958" role="button" title="BUGstats_1-1666794075093.png" alt="BUGstats_1-1666794075093.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;&lt;CODE class=""&gt;1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 NOTE: ODS statements in the SAS Studio environment may disable some output features.
 69         
 70         */Note the variable Week should really say Day;
 71         Data WholeP;
 72         Infile datalines dlm="09"x;
 73         input Week Trmt Block Alive;
 74         datalines;
 
 NOTE: The data set WORK.WHOLEP has 192 observations and 4 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              667.50k
       OS Memory           24228.00k
       Timestamp           10/26/2022 02:16:17 PM
       Step Count                        30  Switch Count  2
       Page Faults                       0
       Page Reclaims                     128
       Page Swaps                        0
       Voluntary Context Switches        10
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 
 267        ;
 268        Run;
 269        
 270        
 271        Proc glimmix data=WholeP;
 272        class Block Week Trmt;
 273        model Alive = Trmt|Week / dist =poisson link=log ddfm=kr;
 274        random Week / subject= Block type=cs residual;
 275          output out=second predicted=pred residual=resid residual(noblup)=mresid student=studentresid student(noblup)=smresid;
 276          lsmeans Trmt*Week / ilink slicediff=Trmt adjust=tukey lines;
 277          ods output lsmeans=lsdata;
 278        run;
 
 NOTE: With DDFM=SATTERTHWAITE or DDFM=KENWARDROGER, unadjusted p-values in tests are based on the degrees of freedom specific to 
       that comparison. P-values that are adjusted for multiplicity, however, are by default based on the denominator degrees of 
       freedom for the Type III test of the fixed effect. If you specify the ADJDFE=ROW option in the LSMEANS or LSMESTIMATE 
       statement, the adjusted p-values take into account the row-wise degrees of freedom.
 
 
&lt;FONT color="#FF0000"&gt; NOTE: Did not converge.&lt;/FONT&gt;
&lt;FONT color="#008000"&gt; WARNING: Output 'lsmeans' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also, 
          verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that 
          the NOPRINT option is not used.&lt;/FONT&gt;
 NOTE: The data set WORK.SECOND has 192 observations and 9 variables.
 NOTE: PROCEDURE GLIMMIX used (Total process time):
       real time           0.25 seconds
       user cpu time       0.26 seconds
       system cpu time     0.00 seconds
       memory              4451.57k
       OS Memory           27896.00k
       Timestamp           10/26/2022 02:16:17 PM
       Step Count                        31  Switch Count  9
       Page Faults                       0
       Page Reclaims                     2426
       Page Swaps                        0
       Voluntary Context Switches        58
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           1088
       
 
 279        
 280        */ need to check model assumptions before moving forward;
 281        /*  Linearity of fixed effects - both as a scatter and a boxplot */
 282        Proc sgplot data=second;
 283          vbox smresid / group=Trmt datalabel;
 284        Run;
 
 NOTE: PROCEDURE SGPLOT used (Total process time):
       real time           1.68 seconds
       user cpu time       0.05 seconds
       system cpu time     0.01 seconds
       memory              8125.96k
       OS Memory           33324.00k
       Timestamp           10/26/2022 02:16:19 PM
       Step Count                        32  Switch Count  1
       Page Faults                       0
       Page Reclaims                     2703
       Page Swaps                        0
       Voluntary Context Switches        267
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           664
&lt;FONT color="#008000"&gt;       
 WARNING: There are insufficient nonmissing observations to create a boxplot.
 WARNING: The BoxPlot statement named 'VBOX' will not be drawn because one or more of the required arguments were not supplied.
 WARNING: A blank graph is produced. For possible causes, see the graphics template language documentation.&lt;/FONT&gt;
 NOTE: There were 192 observations read from the data set WORK.SECOND.
 
 285        
 286        Proc sgplot data=second;
 287          vbox smresid / group=Week datalabel;
 288        Run;
 
 NOTE: PROCEDURE SGPLOT used (Total process time):
       real time           0.07 seconds
       user cpu time       0.04 seconds
       system cpu time     0.00 seconds
       memory              2223.75k
       OS Memory           33324.00k
       Timestamp           10/26/2022 02:16:19 PM
       Step Count                        33  Switch Count  1
       Page Faults                       0
       Page Reclaims                     355
       Page Swaps                        0
       Voluntary Context Switches        108
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           400
       
&lt;FONT color="#008000"&gt; WARNING: There are insufficient nonmissing observations to create a boxplot.
 WARNING: The BoxPlot statement named 'VBOX' will not be drawn because one or more of the required arguments were not supplied.
 WARNING: A blank graph is produced. For possible causes, see the graphics template language documentation.&lt;/FONT&gt;
 NOTE: There were 192 observations read from the data set WORK.SECOND.
 
 289        
 290        /* Homogeneity of effects */
 291        Proc sgscatter data=second;
 292          plot studentresid*(pred Trmt Week);
 293        Run;
 
 NOTE: PROCEDURE SGSCATTER used (Total process time):
       real time           0.38 seconds
       user cpu time       0.04 seconds
       system cpu time     0.01 seconds
       memory              2156.87k
       OS Memory           33624.00k
       Timestamp           10/26/2022 02:16:19 PM
       Step Count                        34  Switch Count  1
       Page Faults                       0
       Page Reclaims                     399
       Page Swaps                        0
       Voluntary Context Switches        163
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           320
&lt;FONT color="#008000"&gt;       
 WARNING: X=PRED is invalid. The option expects that the column not contain all missing values.
 WARNING: Y=STUDENTRESID is invalid. The option expects that the column not contain all missing values.
 WARNING: Y=STUDENTRESID is invalid. The option expects that the column not contain all missing values.&lt;/FONT&gt;
 NOTE: There were 192 observations read from the data set WORK.SECOND.
 
 294        
 295        /* Q-Q plot and Shapiro-Wilk for normal distribution */
 296        Proc univariate data=second normal plot;
 297          var studentresid;
 298          histogram studentresid / normal kernel;
 299        Run;
 
 &lt;FONT color="#008000"&gt;WARNING: Insufficient number of nonmissing observations to create a histogram for studentresid.&lt;/FONT&gt;
 NOTE: PROCEDURE UNIVARIATE used (Total process time):
       real time           0.01 seconds
       user cpu time       0.01 seconds
       system cpu time     0.00 seconds
       memory              810.00k
       OS Memory           32420.00k
       Timestamp           10/26/2022 02:16:19 PM
       Step Count                        35  Switch Count  0
       Page Faults                       0
       Page Reclaims                     179
       Page Swaps                        0
       Voluntary Context Switches        1
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           0
       
 
 300        
 301        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 311        &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I apologize for the long post but also for reference here are snippets of results and log output from gamma (using the exact same code as above):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BUGstats_2-1666794741024.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76652i48F61B868DEEA63A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BUGstats_2-1666794741024.png" alt="BUGstats_2-1666794741024.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BUGstats_3-1666794777321.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76653i851F913C1768483E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BUGstats_3-1666794777321.png" alt="BUGstats_3-1666794777321.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt; Proc glimmix data=WholeP;
 272        class Block Week Trmt;
 273        model Alive = Trmt|Week / dist =gamma link=log ddfm=kr;
 274        random Week / subject= Block type=cs residual;
 275          output out=second predicted=pred residual=resid residual(noblup)=mresid student=studentresid student(noblup)=smresid;
 276          lsmeans Trmt*Week / ilink slicediff=Week adjust=tukey lines;
 277          ods output lsmeans=lsdata;
 278        run;
 
 NOTE: With DDFM=SATTERTHWAITE or DDFM=KENWARDROGER, unadjusted p-values in tests are based on the degrees of freedom specific to 
       that comparison. P-values that are adjusted for multiplicity, however, are by default based on the denominator degrees of 
       freedom for the Type III test of the fixed effect. If you specify the ADJDFE=ROW option in the LSMEANS or LSMESTIMATE 
       statement, the adjusted p-values take into account the row-wise degrees of freedom.
 
 
 NOTE: Some observations are not used in the analysis because of: zero or negative response (n=89).
 NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.
&lt;FONT color="#FF0000"&gt; ERROR: LINES display is not produced for the Week*Trmt effect because p-values are not available for all least-squares means 
        differences.&lt;/FONT&gt;
 NOTE: The data set WORK.LSDATA has 24 observations and 10 variables.
 NOTE: The data set WORK.SECOND has 192 observations and 9 variables.
 NOTE: PROCEDURE GLIMMIX used (Total process time):
       real time           0.26 seconds
       user cpu time       0.26 seconds
       system cpu time     0.00 seconds
       memory              5178.09k
       OS Memory           30204.00k
       Timestamp           10/26/2022 02:31:34 PM
       Step Count                        53  Switch Count  11
       Page Faults                       0
       Page Reclaims                     1548
       Page Swaps                        0
       Voluntary Context Switches        79
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           1384
     &lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 15:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840919#M332488</guid>
      <dc:creator>BUGstats</dc:creator>
      <dc:date>2022-10-26T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840993#M332509</link>
      <description>&lt;P&gt;Actually, while the answer looks like something good, it has a problem with convergence and a nonpositive definite G matrix for these dates. The methods I tried had the same issue.&amp;nbsp; So...&lt;/P&gt;
&lt;P&gt;I fit the week/day variable with a spline that differed by trmt. The following is what worked remarkably well and converged rapidly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=WholeP;
   class trmt block;
   effect spl = spline(week);
   model Alive = trmt spl*trmt/ s noint dist=poisson;
   estimate 'trmt 1, week=7' trmt 1    trmt*spl [1,1 1] /ilink;
   estimate 'trmt 2, week=7' trmt 0  1 trmt*spl [1,2 1]/ilink;
   estimate 'trmt 3, week=7' trmt 0  0 1 trmt*spl [1,3 1]/ilink;
   estimate 'Diff trmt1 v trmt2 at week=7 ' trmt 1 -1 trmt*spl [1,1 1] [-1,2 1];
   estimate 'Diff trmt1 v trmt3 at week=7 ' trmt 1 0 -1 trmt*spl [1,1 1] [-1,3 1];
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No sense in applying the ilink to the differences, unless you are interested in "fold change", so they show as non-est in the output:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Type III Tests of Fixed Effects
Effect	Num DF	Den DF	F Value	Pr &amp;gt; F
Trmt	     3	   171	9.97	&amp;lt;.0001
spl*Trmt	17	   171	14.94	&amp;lt;.0001
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SteveDenham_1-1666808345433.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76675i25B7C020B89C1737/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SteveDenham_1-1666808345433.png" alt="SteveDenham_1-1666808345433.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, this worked.&amp;nbsp; I tried using an integration method rather than the default pseudo-likelihood method used here, but the results were identical.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Note that the code is correct, but the labels are not - they all should read week=0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 18:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840993#M332509</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-10-26T18:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Non-normal data; PROC GLIMMIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840999#M332512</link>
      <description>&lt;P&gt;Thank&amp;nbsp;you again&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;. This is a great solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have clarification questions. The estimate statements written, how do you change them to evaluate the difference at different time periods. For example at week 49 (the last time frame in my data)? I believe it has something to do with changing the values in the brackets but I don't know how to know what to change them to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 18:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Non-normal-data-PROC-GLIMMIX/m-p/840999#M332512</guid>
      <dc:creator>BUGstats</dc:creator>
      <dc:date>2022-10-26T18:56:48Z</dc:date>
    </item>
  </channel>
</rss>

