<?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 GLIMMIX for a complex model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114765#M6038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to analyze some data I received after an experiment, and I need your assistance with setting up the correct PROC GLIMMIX syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached photo, you can see a scheme I have prepared of what I understand the design is. I will sum the scheme in a few words here as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The experiment is dealing with a new experimental surgery tool, that can be used for several surgeries of some kind. The new tool is being tested against 2 current active tools. This is a pilot study, therefore not too much care was taken in designing the experiment, and I think there was no involvement of someone who understands a little bit of statistics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two different surgical procedures were used (out of a few possible ones). In total, 26 subjects (animals in this case) were sampled. Each subject was assigned randomly to one and only procedure type. Each subject, went on surgery in 1 or more locations in the body. Each surgery is one unit, or one observation in my data, and each surgery was assigned randomly to one of 3 treatments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To sum it up, I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 fixed effect - the treatment&lt;/P&gt;&lt;P&gt;1 random effect - the procedure type&lt;/P&gt;&lt;P&gt;1-4 repeated measures per subject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my outcome is binary, 0 means no complication, while 1 means existence of complication. I want to show that the experimental treatment is superior, by having far too 0's than the other two. Originally, the response had levels of complication severity, but due to the small sample, and to the distribution of values, I had no much choice but the merge it and create a binary response (an ordinal model wouldn't work I think).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached photo there is the design as I see it, I have failed to transfer this design into an ANOVA table in the WWFD way (what would Fisher do) way suggest in the book of Walter Stroup, this whole topic of GLMM is new to me and I also struggle with the syntax. I did set something up, but I am very convinced that it's wrong, simply because I still do not understand some basics of the procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My syntax was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="color: navy; font-size: 10pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; font-family: 'Courier New';"&gt;glimmix&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=data &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;method&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=quad;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Subject_ID Treatment Procedure_Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Response = Treatment Treatment(Procedure_Type) / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;dist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; = binary &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;link&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=logit &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;oddsratio&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; intercept / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Subject_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Procedure_Type / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Subject_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;lsmeans&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Treatment(Procedure_Type) / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;slice&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Procedure_Type &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;slicediff&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Procedure_Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="color: navy; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;I do not understand the structure of the random &lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New';"&gt;statement&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;, and have no idea how to tell SAS that I have both a random effect and repeated measures.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;This syntax is not more than a "shot in the dark". In the book of Walter Stroup there are more than one way to set up the procedure, I don't understand the very basic difference between (for example):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;model Y= a b(a)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;model Y= a b a*b&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;model Y= a|b&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;Any help with setting up the correct procedure will be most appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;Thank you in advance&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10647i4265AB6E4DC1B284/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Design.JPG" title="Design.JPG" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Apr 2013 14:01:59 GMT</pubDate>
    <dc:creator>BlueNose</dc:creator>
    <dc:date>2013-04-20T14:01:59Z</dc:date>
    <item>
      <title>Proc GLIMMIX for a complex model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114765#M6038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to analyze some data I received after an experiment, and I need your assistance with setting up the correct PROC GLIMMIX syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached photo, you can see a scheme I have prepared of what I understand the design is. I will sum the scheme in a few words here as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The experiment is dealing with a new experimental surgery tool, that can be used for several surgeries of some kind. The new tool is being tested against 2 current active tools. This is a pilot study, therefore not too much care was taken in designing the experiment, and I think there was no involvement of someone who understands a little bit of statistics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two different surgical procedures were used (out of a few possible ones). In total, 26 subjects (animals in this case) were sampled. Each subject was assigned randomly to one and only procedure type. Each subject, went on surgery in 1 or more locations in the body. Each surgery is one unit, or one observation in my data, and each surgery was assigned randomly to one of 3 treatments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To sum it up, I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 fixed effect - the treatment&lt;/P&gt;&lt;P&gt;1 random effect - the procedure type&lt;/P&gt;&lt;P&gt;1-4 repeated measures per subject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my outcome is binary, 0 means no complication, while 1 means existence of complication. I want to show that the experimental treatment is superior, by having far too 0's than the other two. Originally, the response had levels of complication severity, but due to the small sample, and to the distribution of values, I had no much choice but the merge it and create a binary response (an ordinal model wouldn't work I think).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached photo there is the design as I see it, I have failed to transfer this design into an ANOVA table in the WWFD way (what would Fisher do) way suggest in the book of Walter Stroup, this whole topic of GLMM is new to me and I also struggle with the syntax. I did set something up, but I am very convinced that it's wrong, simply because I still do not understand some basics of the procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My syntax was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="color: navy; font-size: 10pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; font-family: 'Courier New';"&gt;glimmix&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=data &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;method&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=quad;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Subject_ID Treatment Procedure_Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Response = Treatment Treatment(Procedure_Type) / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;dist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; = binary &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;link&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=logit &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;oddsratio&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; intercept / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Subject_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Procedure_Type / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Subject_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;lsmeans&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt; Treatment(Procedure_Type) / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;slice&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Procedure_Type &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;slicediff&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;=Procedure_Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="color: navy; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;I do not understand the structure of the random &lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New';"&gt;statement&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;, and have no idea how to tell SAS that I have both a random effect and repeated measures.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;This syntax is not more than a "shot in the dark". In the book of Walter Stroup there are more than one way to set up the procedure, I don't understand the very basic difference between (for example):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-family: 'Courier New'; font-size: 10pt;"&gt;model Y= a b(a)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;model Y= a b a*b&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;model Y= a|b&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;Any help with setting up the correct procedure will be most appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #222222; font-size: small; background-color: #ffffff; font-family: 'Courier New';"&gt;Thank you in advance&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10647i4265AB6E4DC1B284/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Design.JPG" title="Design.JPG" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Apr 2013 14:01:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114765#M6038</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2013-04-20T14:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLIMMIX for a complex model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114766#M6039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For random effects like PROCEDURE, use the following version of the RANDOM statement in PROC GLIMMIX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; random PROCEDURE / subject=ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a repeated measure effect like LOCATION, use the following version of the RANDOM statement in PROC GLIMMIX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; random LOCATION / subject=ID residual;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RESIDUAL option of the RANDOM statement in PROC GLIMMIX converts the effect from a "G-sided" random effect to&lt;/P&gt;&lt;P&gt;an "R-sided" repeated measure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fixed effects like TREATMENT should be specified as independent variables in the MODEL statement (to the "right" of the equals sign).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first MODEL statement you are puzzled about above,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model Y=a b(a);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;specifies as independent variables a main effect, a, and a nested effect, b(a), in which the factor, b, is nested within a.&amp;nbsp; Note that this SAS model syntax implies that b does not have a main effect term, independent of its association with a.&amp;nbsp; This MODEL statement also has the equivalent SAS syntax of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model Y=a b*a;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second and the third MODEL statements you are puzzled about above,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model Y=a b a*b;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model Y=a | b;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are equivalent in SAS, with the independent variables in the third statement, a | b, being an abbreviated notation for those in the second statement,&amp;nbsp; a&amp;nbsp; b&amp;nbsp; a*b.&amp;nbsp; Both these MODEL statements specify as independent variables two main effects, a and b, and their interaction, a*b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Apr 2013 21:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114766#M6039</guid>
      <dc:creator>1zmm</dc:creator>
      <dc:date>2013-04-20T21:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLIMMIX for a complex model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114767#M6040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thank you, the differences between the statements are much clearer now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;According to your explanation my MODEL statement is all wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Is there a meaning to defining a random effect AND adding it to the model statement ? From your explanation I conclude that my statement should be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: #222222;"&gt; Response = Treatment / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;dist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: #222222;"&gt; = binary &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;link&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: #222222;"&gt;=logit &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;oddsratio&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: #222222;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt; Procedure_Type / &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;=Subject_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #ff0000;"&gt; location&lt;/SPAN&gt; / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;=Subject_ID &lt;SPAN style="color: #0000ff;"&gt;residual&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, sans-serif; color: #222222; background-color: #ffffff;"&gt;I do not have a LOCATION variable. As it happens, I do not know the exact location, all I know is that subject ID1 had 2 surgeries in 2 locations, and let's say ID2 had 3 surgeries in 3 locations, I do not know which locations are they. If I create a new variable representing the repeated measures, we can call it &lt;SPAN style="color: #ff0000;"&gt;location&lt;/SPAN&gt;, than location "1" for ID1, might be a different location than "1" for ID2. What I am saying is that my variables are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;SubjectID, ProcedureType, Treatment, Response&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Should I create a new variable representing the repeated measures (what you called LOCATION) ? If so, how will SAS know that I do not mean a time variable with equal spaces ? When defining the residual to move to the "R-Side", do I need to define the type of correlation (AR1, CS, ....) ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;And one more question please, when do I then use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="color: #993366; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt; intercept / &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;=Subject_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;Thank you very much, your answer is much clearer than any written guide I found &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;Edit1: Just tried to run the above statements, and got an error: "R-side random effects are not supported for METHOD=QUAD". I will try LAPLACE and if not will have to settle for PL, which isn't good. What I did was: random _residual_ / subject=Animal_ID type=vc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;which is similar to adding residual at the end of the statement with intercept at the beginning (I am learning slowly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;Edit2: I ran the lsmeans statement: lsmeans Treatment / slice=Procedure_Type slicediff=Procedure_Type plot=meanplot(sliceby=Procedure_Type);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-size: 10pt; font-style: inherit; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not only that it ain't slicing by Procedure_Type like I want, it gives me negative estimators for the 3 treatments. Maybe I miss something basic, but how can values of 0 and 1 yield a negative mean ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Apr 2013 07:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114767#M6040</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2013-04-21T07:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLIMMIX for a complex model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114768#M6041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My suggestions about your earlier questions are in the attached .TXT document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The LSMEANS estimates for treatment are negative because of your use of the logit link, where probabilities between 0 and 1 are specified as logits, ln(p/(1-p)), which can be less than zero when the estimated probability is less than 0.50 [for example, if p=0.40, ln(0.4/0.6) ~= - 0.41].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Apr 2013 16:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114768#M6041</guid>
      <dc:creator>1zmm</dc:creator>
      <dc:date>2013-04-21T16:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLIMMIX for a complex model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114769#M6042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One other point--with a binomial distribution, using the residual option means that you are fitting a marginal model, where the estimated proportions are "regressed toward the mean", as opposed to a conditional model where the estimated proportions are those expected values given the random effects.&amp;nbsp; So on this I disagree some with Matt, and I would fit:&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&lt;STRONG style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;glimmix&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;=data &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;method&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;=quad;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt; Subject_ID Treatment Procedure_Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt; Response = Treatment|Procedure_Type / &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;dist&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt; = binary &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;link&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;=logit &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;oddsratio&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt; intercept / &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;=Subject_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; random Treatment/subject=subject_id type= &amp;lt;pick between CSH, CHOL, or VC&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;lsmeans&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt; Treatment*Procedure_Type / &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;slice&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;=Procedure_Type &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;slicediff&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;=Procedure_Type ilink oddsratio;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&lt;STRONG style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt; &lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;Here I fit the repeated measures on the G-side, and choose between three covariance structures having unequal values on the diagonal, and either zeros for covariance (VC), a constant covariance factor (CSH), or a fully unstructured covariance (CHOL).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt; &lt;/P&gt;&lt;P style="background-color: #ffffff; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;Steve Denham&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 16:22:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114769#M6042</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-23T16:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GLIMMIX for a complex model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114770#M6043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt, thank you for the long explanation, it is very informative !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve, in your code the Procedure_Type is a fixed effect, did you mean in the 3rd line of the code to write Procedure_Type, or should I add another random statement ?&lt;/P&gt;&lt;P&gt;When I ran the code, the G matrix wasn't positive defined, could it be because I had 2 random statements with Subject_ID ?&lt;/P&gt;&lt;P&gt;I also got weird OR estimated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellpadding="5" cellspacing="0" class="table" frame="box" rules="all" summary="Procedure Glimmix: Odds Ratio Estimates"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;OR&lt;/TD&gt;&lt;TD colspan="1"&gt;DF&lt;/TD&gt;&lt;TD colspan="1"&gt;L_CL&lt;/TD&gt;&lt;TD colspan="1"&gt;U_CL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l data"&gt;Treatment1&lt;/TH&gt;&lt;TH class="l data"&gt;&lt;/TH&gt;&lt;TH class="l data"&gt;Treatment3&lt;/TH&gt;&lt;TH class="l data"&gt;&lt;/TH&gt;&lt;TD class="r data"&gt;&amp;lt;0.001&lt;/TD&gt;&lt;TD class="r data"&gt;11&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;lt;0.001&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;lt;0.001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l data"&gt;Treatment2&lt;/TH&gt;&lt;TH class="l data"&gt;&lt;/TH&gt;&lt;TH class="l data"&gt;Treatment3&lt;/TH&gt;&lt;TH class="l data"&gt;&lt;/TH&gt;&lt;TD class="r data"&gt;&amp;lt;0.001&lt;/TD&gt;&lt;TD class="r data"&gt;11&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;lt;0.001&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;lt;0.001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l data"&gt;&lt;/TH&gt;&lt;TH class="l data"&gt;Procedure1&lt;/TH&gt;&lt;TH class="l data"&gt;&lt;/TH&gt;&lt;TH class="l data"&gt;Procedure2&lt;/TH&gt;&lt;TD class="r data"&gt;&amp;gt;999.999&lt;/TD&gt;&lt;TD class="r data"&gt;26&lt;/TD&gt;&lt;TD class="r data"&gt;440.053&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;gt;999.999&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellpadding="5" cellspacing="0" class="table" frame="box" rules="all" summary="Procedure Glimmix: Type III Tests of Fixed Effects"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;Effect&lt;/TD&gt;&lt;TD colspan="1"&gt;NUM DF&lt;/TD&gt;&lt;TD colspan="1"&gt;DEN DF&lt;/TD&gt;&lt;TD colspan="1"&gt;F&lt;/TD&gt;&lt;TD colspan="1"&gt;P.V&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l rowheader" scope="row"&gt;Treatment&lt;/TH&gt;&lt;TD class="r data"&gt;2&lt;/TD&gt;&lt;TD class="r data"&gt;11&lt;/TD&gt;&lt;TD class="r data"&gt;39.32&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l rowheader" scope="row"&gt;Procedure_Type&lt;/TH&gt;&lt;TD class="r data"&gt;1&lt;/TD&gt;&lt;TD class="r data"&gt;26&lt;/TD&gt;&lt;TD class="r data"&gt;45.09&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l rowheader" scope="row"&gt;Treatment*Procedure_&lt;/TH&gt;&lt;TD class="r data"&gt;2&lt;/TD&gt;&lt;TD class="r data"&gt;26&lt;/TD&gt;&lt;TD class="r data"&gt;Infty&lt;/TD&gt;&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I ran Matt's code I have also received some wide confidence intervals for OR, however the F value did not converged to infinity (I did not have Procedure_Type as a fixed effect)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can these outputs be a result of what Matt has mentioned, the model balking due to the fact that some subjects had 2 surgeries with the same treatment, which are my repeated measures ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some more outputs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pearson Chi-Square / DF = 0.69 (which is good)&lt;/P&gt;&lt;P&gt;&lt;A name="IDX232"&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE cellpadding="5" cellspacing="0" class="table" frame="box" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;start&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" rules="all" summary="Procedure Glimmix: Covariance Parameter Estimates"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="3"&gt;covariance prarameter estimates&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l rowheader" scope="row"&gt;Intercept&lt;/TH&gt;&lt;TH class="l data"&gt;Subject_ID&lt;/TH&gt;&lt;TD class="r data"&gt;0.5162&lt;/TD&gt;&lt;TD class="r data"&gt;1.4348&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="l rowheader" scope="row"&gt;Treatment&lt;/TH&gt;&lt;TH class="l data"&gt;Subject_ID&lt;/TH&gt;&lt;TD class="r data" nowrap="nowrap"&gt;1.14E-13&lt;/TD&gt;&lt;TD class="r data"&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit1: When I changed Steve's code and replaced the Subject_ID by Procedure_Type in the random statement, I have received the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Estimation by quadrature is available only if the data can be processed by subjects.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Make sure that all G-side RANDOM statements have SUBJECT= effects. If there are multiple&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;SUBJECT= effects they need to form a containment hierarchy, e.g., SUBJECT=A,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;SUBJECT=A*B, SUBJECT=A(B), ... .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Edit 2: When I removed the interaction term (which wasn't significant) I got slightly more reasonable results, the code was:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=data method=quad;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class Subject_ID Treatment Procedure_Type;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model Response = Treatment Procedure_Type / dist = binary link=logit oddsratio;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; random Treatment / subject=Subject type=vc;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;By the way, silly question maybe, how do I interpret an OR value of less than 1 ? I always find it hard (treatment 3 has many more 0's - non events, than treatments 1 and 2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;For example if I get&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Treatment Treatment OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.009&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Edit 3: I have "re-coded" the response, to get OR larger than 1, and I get an OR of 60 with CI of 6 to 600, due to small sample and perhaps other factors, how can I report such results ? I mean, it is significant (1 is not inside the CI), but I am not being very precise, am I ? One of the reasons for this is the sample size, in the control treatments, there are hardly any "successes". I have 15 samples in one of them, with 14 failures and 1 success, so the "1" is the problem.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 07:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GLIMMIX-for-a-complex-model/m-p/114770#M6043</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2013-04-24T07:12:34Z</dc:date>
    </item>
  </channel>
</rss>

