<?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: PROC GLIMMIX test for homogeneity with 2 repeated factors in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/961082#M48147</link>
    <description>I beleive I was emailing you as you were posting. I am new to posting on this site. I will look through these and get back with any questions. Thank you.</description>
    <pubDate>Thu, 06 Mar 2025 15:24:16 GMT</pubDate>
    <dc:creator>jsb</dc:creator>
    <dc:date>2025-03-06T15:24:16Z</dc:date>
    <item>
      <title>PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960752#M48115</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am working on a dataset where the interest is not in testing for the adjusted mean differences solely but on testing whether the variability differs between two independent groups.&amp;nbsp; The measurements are nested in a sense in a combination of distance and location within a distance of a circle.&amp;nbsp; Assuming the center of the circle is a reference point (of the eye) there are 3 levels of eccentricity (distance) and locations on that circle (location).&amp;nbsp; I need to correctly specify this model, considering this structure to accurately have the proper degrees of freedom and fixed effects.&amp;nbsp; Specifically, I have the following questions that I hope some could help me out with:&lt;/P&gt;&lt;P&gt;1. I generally use PROC MIXED but in a search focusing on variability and not means, I found that GLIMMIX is best to use as a test for homogeneity that should provide this result.&amp;nbsp; Assuming the model is specified correctly, would the indpendent factor being specified as a fixed factor in addition to group variance in a random statement be appropriate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I have currently specified 3 random statements, one for ID and two each for the nested (locationxdistance combo within id scenario? This seems over specified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 17:40:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960752#M48115</guid>
      <dc:creator>jsb</dc:creator>
      <dc:date>2025-03-03T17:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960807#M48119</link>
      <description>&lt;P&gt;Not sure I undestand your question.&lt;/P&gt;
&lt;P&gt;You could use GROUP= option to assume obs from the same group have the same variance .&lt;/P&gt;
&lt;PRE&gt;random int/subject=school group=class;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1741054800964.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105134iDCD4FAA042AE7771/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1741054800964.png" alt="Ksharp_0-1741054800964.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)You also could try COVTEST statement to test if the covariance is different between two group:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1741055252304.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105135iD33D7FD07DCA528C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1741055252304.png" alt="Ksharp_0-1741055252304.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 02:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960807#M48119</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-03-04T02:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960906#M48129</link>
      <description>&lt;A href="https://support.sas.com/kb/40/724.html" target="_blank"&gt;https://support.sas.com/kb/40/724.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/37/107.html" target="_blank"&gt;https://support.sas.com/kb/37/107.html&lt;/A&gt;</description>
      <pubDate>Wed, 05 Mar 2025 02:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960906#M48129</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-03-05T02:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960958#M48138</link>
      <description>&lt;P&gt;Thank you for your responses.&amp;nbsp; I'dl ike to specify that the residuals could differ across group.&amp;nbsp; I am trying to ask the question, does the variance differ across groups (independent factor) while maintaining the structure/design features of the datset.&amp;nbsp; So, I think I would like to determine whether the residual variance differs across group while maintaining this two-way design.&amp;nbsp; My mixed model could look something like this but I am unsure how to specify this in glimmix, given that GLIMMIX does not allow repeated statement. I understand how to do this with one repeated factor but not 2.&amp;nbsp; Is this more clear? group=independent group; rf1=first within-subject condition; rf2=second within-subject factor such that rf1xrf2 create a unique combination. I first need to specify the residual structure in glimmix correctly and then will use the covtest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=data covtest;&lt;BR /&gt;class id group rf1 rf2;&lt;BR /&gt;model y=group;&lt;BR /&gt;random subj rf1(id) rf2(id)/ v vcorr group=group;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 16:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/960958#M48138</guid>
      <dc:creator>jsb</dc:creator>
      <dc:date>2025-03-05T16:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/961025#M48142</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;I understand how to do this with one repeated factor but not 2. "&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to specify two factors in REPEATED ,you need to specify a special covariance construct:&lt;/SPAN&gt;&lt;/P&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="Ksharp_0-1741224519428.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105191i1D592215A7619E4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1741224519428.png" alt="Ksharp_0-1741224519428.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="Ksharp_1-1741224547336.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105192i226089E202E74DF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1741224547336.png" alt="Ksharp_1-1741224547336.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For GLIMMIX, could like:&lt;/P&gt;
&lt;P&gt;random Var Year/type=un@ar(1) subject=Child residual;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp; might know your question better and could give you a hand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 01:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/961025#M48142</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-03-06T01:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/961072#M48145</link>
      <description>&lt;P&gt;Here are links to couple threads in the community from some years ago:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-with-two-repeated-measures-variables/td-p/232686" target="_self"&gt;https://communities.sas.com/t5/SAS-Procedures/GLIMMIX-with-two-repeated-measures-variables/td-p/232686&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/repeated-measures-in-glimmix/td-p/128310" target="_self"&gt;https://communities.sas.com/t5/Statistical-Procedures/repeated-measures-in-glimmix/td-p/128310&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt;&amp;nbsp;has several ways of modeling the doubly repeated measures and compares V matrices from MIXED and GLIMMIX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second is from me, and has a lot of untested code in the GLIMMIX call, but basically boils down to calling one effect as strictly G side, and the effect nested within that variable (say time) as an R-side (residual). Take care in identifying the subject for the R-side effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 15:01:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/961072#M48145</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2025-03-06T15:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/961082#M48147</link>
      <description>I beleive I was emailing you as you were posting. I am new to posting on this site. I will look through these and get back with any questions. Thank you.</description>
      <pubDate>Thu, 06 Mar 2025 15:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/961082#M48147</guid>
      <dc:creator>jsb</dc:creator>
      <dc:date>2025-03-06T15:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX test for homogeneity with 2 repeated factors</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/962120#M48208</link>
      <description>&lt;P&gt;Hi Steve &lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708" target="_blank" rel="noopener"&gt;@sld&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thank you for the code provided.&amp;nbsp; I have a few questions for you if you could help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. In your code provided, I understand year and month are within-subject factors but was treatment?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. The whole purpose to evaluate the variance (heterogeneity) of group.&amp;nbsp; In the GLIMMIX example below, I am able to estimate a variance matric for each rf1, but am not sure how to add a second group.&amp;nbsp; How would you recommend manipulating the code?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. My factors are imbalanced.&amp;nbsp; Factor levels of rf2 vary by rf1.&amp;nbsp; I do not necessarily need a 20x20 (point by point) but would like an estimated variance of rf1 and rf2 (potentially rf1xrf2) and group.&amp;nbsp; Neither of the models below get me that. Would a random statement for each be better?&lt;/P&gt;&lt;P&gt;4. I am familiar with post plots of lsmeans but do you know of a good post plot to display the variances aside from a table?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc mixed data=data covtest;
class rf1 rf2 subj group;
model y = group|rf1|rf2 / ddfm=kr;
repeated rf1 rf2/subject=subj(group) type=un@cs r rcorr group=group;
run;

proc glimmix data=data;
    nloptions gconv=0;
    class rf1 rf2 subj group;
    model y = group|rf1|rf2 / ddfm=kr;
    random rf2 / subject=subj(group) group=rf1 type=ar(1) v residual;
    run;

proc mixed data=y covtest;
    class rf1 rf2 subj group;
    model y = group|rf1|rf2 / ddfm=kr;
random intercept/subject=subj group=group v vcorr;
repeated rf2/subject=subj*rf1 type=ar(1) group=group;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jsb_0-1742233968681.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105460i092654185DC61913/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jsb_0-1742233968681.png" alt="jsb_0-1742233968681.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 16:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-test-for-homogeneity-with-2-repeated-factors/m-p/962120#M48208</guid>
      <dc:creator>jsb</dc:creator>
      <dc:date>2025-03-18T16:34:31Z</dc:date>
    </item>
  </channel>
</rss>

