<?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: ERROR: QUANEW Optimization cannot be completed. in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672500#M32173</link>
    <description>&lt;P&gt;One other point - the random _residual_ statement with the subject=treatment*block doesn't do anything, as there are several blocks without replication of treatment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so you could remove that statement.&amp;nbsp; Also, the test for homogeneity is no longer applicable, as I removed the group= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2020 12:05:04 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-07-27T12:05:04Z</dc:date>
    <item>
      <title>ERROR: QUANEW Optimization cannot be completed.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672336#M32148</link>
      <description>&lt;P&gt;The following SAS procedures did not work. Look forward to your help.&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Activity;                                                                                                                                                                                                                                                      
  length treatment $20;
  input treatment$ block Km Vmax;                                                                                                                                                                                                                                  
  datalines;
  Non-Antibiotics 5 46.18 28.06
  Non-Antibiotics 3 55.61 24.64
  Non-Antibiotics 4 58.71 27.35
  Non-Antibiotics 3 47.32 22.15
  Non-Antibiotics 4 43.61 12.53
  Non-Antibiotics 8 52.00 25.94
  Non-Antibiotics 11 54.65 21.34
  Non-Antibiotics 5 64.54 25.73
  Non-Antibiotics 10 51.27 24.36
  Non-Antibiotics 5 57.61 23.04
  Non-Antibiotics 5 48.37 32.42
  Non-Antibiotics 9 56.04 40.59
  Non-Antibiotics 6 53.89 11.33
  Antibiotics 8 39.02 27.74
  Antibiotics 4 55.56 16.92
  Antibiotics 7 56.97 25.41
  Antibiotics 9 58.29 31.49
  Antibiotics 4 53.18 28.04
  Antibiotics 11 41.89 43.48
  Antibiotics 5 40.35 38.12
  Antibiotics 3 54.84 40.96
  Antibiotics 10 47.66 32.51
  Antibiotics 6 61.14 35.47
  Antibiotics 5 52.42 38.02
  ;
  run;
Proc print data=Activity;
run;
proc glimmix data=Activity nobound; 
  class treatment block;
  model Km = treatment; 
  random block/subject=treatment*block type=cs residual;
  random _residual_/subject=treatment*block group=treatment; 
  lsmeans treatment/tdiff lines;
  covtest homogeneity;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="111.png" style="width: 623px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47669i5A6696F70EC75A51/image-size/large?v=v2&amp;amp;px=999" role="button" title="111.png" alt="111.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jul 2020 17:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672336#M32148</guid>
      <dc:creator>kellychan84</dc:creator>
      <dc:date>2020-07-25T17:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: QUANEW Optimization cannot be completed.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672497#M32172</link>
      <description>&lt;P&gt;The two random statements lead to problems.&amp;nbsp; The first says to treat the blocks as random, with correlated errors by block, while the second adds in an overdispersion factor, and the errors are heteroscedastic by treatment.&amp;nbsp; Try simplifying the model to something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=Activity nobound; 
  class treatment block;
  model Km = treatment; 
  random intercept/subject=block;
  random _residual_/subject=treatment*block; 
  lsmeans treatment/tdiff lines;
  covtest homogeneity;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I removed the group= option as the estimates you presented differed by less than 5%, so I don't think you have good evidence for separate estimates for the residual VC.&amp;nbsp; I also changed the first statement to a G side random effect.&amp;nbsp; Give this a shot, and check the results to see if they make sense.&amp;nbsp; If you still catch the QUANEW issue you may have to relax your convergence criteria, or add in a method= statement to switch to RMPL (residual marginal pseudo-likelihood).&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>Mon, 27 Jul 2020 11:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672497#M32172</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-27T11:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: QUANEW Optimization cannot be completed.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672500#M32173</link>
      <description>&lt;P&gt;One other point - the random _residual_ statement with the subject=treatment*block doesn't do anything, as there are several blocks without replication of treatment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so you could remove that statement.&amp;nbsp; Also, the test for homogeneity is no longer applicable, as I removed the group= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 12:05:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672500#M32173</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-27T12:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: QUANEW Optimization cannot be completed.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672895#M32209</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;! Your reply really help! The reason I am testing homogeneity is that my supervisor wants to see this data. And if I removed the group option in my random_residual_statement, the homogeneity data will not show up. You mentioned in your reply that "or add in a method= statement to switch to RMPL (residual marginal pseudo-likelihood)" , I do not have experience in this statement and don't know whether it will help to get the homogeneity data by adding this to my coding.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And by catching this great opportunity, can I ask you another question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To analyse my data, I first used the code blow. It did not work at first, but when I added parms statement, it worked. And I also try your coding suggestions, it also work. But the result is a bit different. Which should I choose to be more accurate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My SAS code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Activity;                                                                                                                                                                                                                                                      
  length treatment $20;
  input treatment$ block Km Vmax;                                                                                                                                                                                                                                  
  datalines;
  Non-Antibiotics 5 46.18 28.06
  Non-Antibiotics 3 55.61 24.64
  Non-Antibiotics 4 58.71 27.35
  Non-Antibiotics 3 47.32 22.15
  Non-Antibiotics 4 43.61 12.53
  Non-Antibiotics 8 52.00 25.94
  Non-Antibiotics 11 54.65 21.34
  Non-Antibiotics 5 64.54 25.73
  Non-Antibiotics 10 51.27 24.36
  Non-Antibiotics 5 57.61 23.04
  Non-Antibiotics 5 48.37 32.42
  Non-Antibiotics 9 56.04 40.59
  Non-Antibiotics 6 53.89 11.33
  Antibiotics 8 39.02 27.74
  Antibiotics 4 55.56 16.92
  Antibiotics 7 56.97 25.41
  Antibiotics 9 58.29 31.49
  Antibiotics 4 53.18 28.04
  Antibiotics 11 41.89 43.48
  Antibiotics 5 40.35 38.12
  Antibiotics 3 54.84 40.96
  Antibiotics 10 47.66 32.51
  Antibiotics 6 61.14 35.47
  Antibiotics 5 52.42 38.02
  ;
  run;
Proc print data=Activity;
run;
proc glimmix data=Activity nobound; 
  class treatment block;
  model Km = treatment; 
  random block/subject=treatment*block type=cs residual;
  parms (-8.6732) (52.0395);
  lsmeans treatment/tdiff lines;
  covtest "block=0" 0 .;
  output out=second predicted=pred residual=resid residual(noblup)=mresid 
  student=sresid student(noblup)=smresid;
run;
proc print data=second;
run;
proc sgplot data=second;
  scatter y=smresid x=pred;
  refline 0;
run;
proc sgplot data=second;
  scatter y=smresid x=treatment;
  refline 0;
run;
proc sgplot data=second;
  vbox smresid/group=treatment datalabel;
run;
proc sgscatter data=second;
  plot sresid*(pred treatment block);
run;
proc univariate data=second normal plot;
  var sresid;
  histogram sresid / normal kernel;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kellychan84_0-1595949869257.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47743i0396B0E6ADC5ADA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kellychan84_0-1595949869257.png" alt="kellychan84_0-1595949869257.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Adapting your code by change a bit to GLMM statement:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=Activity nobound; 
  class treatment block;
  model Km = treatment; 
  random intercept/subject=block;
  lsmeans treatment/tdiff lines;
  covtest "block=0" 0 .;
  output out=second predicted=pred residual=resid residual(noblup)=mresid 
  student=sresid student(noblup)=smresid;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kellychan84_1-1595950001170.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47744iF39D96CB4998F6DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kellychan84_1-1595950001170.png" alt="kellychan84_1-1595950001170.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Great thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-QUANEW-Optimization-cannot-be-completed/m-p/672895#M32209</guid>
      <dc:creator>kellychan84</dc:creator>
      <dc:date>2020-07-28T15:38:56Z</dc:date>
    </item>
  </channel>
</rss>

