<?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 Handling heteroskedasticity in Glimmix regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758296#M36912</link>
    <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I am having a hard time finding out how to specify an error heteroskedasticity model using Glimmix to run a mixed regression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found &lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-fit-a-multilevel-model-with-heteroskedasticity-in-my-residual-variances/" target="_self"&gt;this resource from UCLA,&lt;/A&gt; which shows how it can be done in Mixed; however, the authors use the&amp;nbsp;&lt;STRONG&gt;local&lt;/STRONG&gt; option in the &lt;STRONG&gt;repeated&lt;/STRONG&gt; statement to specify that variance depends on the level of the dependent variable. I do not see the&amp;nbsp;&lt;STRONG&gt;local&lt;/STRONG&gt; option in Glimmix.&lt;/P&gt;&lt;P&gt;The authors give the following code as an example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data nys1; set nys1;
  if time = 1 then ind2 = 1; else ind2 = 0;
  if time = 2 then ind3 = 1; else ind3 = 0;
  if time = 3 then ind4 = 1; else ind4 = 0;
  if time = 4 then ind5 = 1; else ind5 = 0;
run;

ods output  CovParms =t;
proc mixed data = nys1 method=ml;
  class id timecat;
  model attit = x time /solution;
  repeated timecat /subject=id type=cs r local=exp(ind2 ind3 ind4 ind5);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How might this be conducted using Glimmix?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2021 23:35:43 GMT</pubDate>
    <dc:creator>dsuchoff1</dc:creator>
    <dc:date>2021-07-29T23:35:43Z</dc:date>
    <item>
      <title>Handling heteroskedasticity in Glimmix regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758296#M36912</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I am having a hard time finding out how to specify an error heteroskedasticity model using Glimmix to run a mixed regression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found &lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-fit-a-multilevel-model-with-heteroskedasticity-in-my-residual-variances/" target="_self"&gt;this resource from UCLA,&lt;/A&gt; which shows how it can be done in Mixed; however, the authors use the&amp;nbsp;&lt;STRONG&gt;local&lt;/STRONG&gt; option in the &lt;STRONG&gt;repeated&lt;/STRONG&gt; statement to specify that variance depends on the level of the dependent variable. I do not see the&amp;nbsp;&lt;STRONG&gt;local&lt;/STRONG&gt; option in Glimmix.&lt;/P&gt;&lt;P&gt;The authors give the following code as an example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data nys1; set nys1;
  if time = 1 then ind2 = 1; else ind2 = 0;
  if time = 2 then ind3 = 1; else ind3 = 0;
  if time = 3 then ind4 = 1; else ind4 = 0;
  if time = 4 then ind5 = 1; else ind5 = 0;
run;

ods output  CovParms =t;
proc mixed data = nys1 method=ml;
  class id timecat;
  model attit = x time /solution;
  repeated timecat /subject=id type=cs r local=exp(ind2 ind3 ind4 ind5);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How might this be conducted using Glimmix?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 23:35:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758296#M36912</guid>
      <dc:creator>dsuchoff1</dc:creator>
      <dc:date>2021-07-29T23:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Handling heteroskedasticity in Glimmix regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758380#M36914</link>
      <description>&lt;P&gt;the LOCAL= option is not available in the RANDOM statement in PROC GLIMMIX, so you cannot fit the same model in PROC GLIMMIX, unfortunately.&lt;/P&gt;
&lt;P&gt;I personally think the LOCAL=EXP() option might be a too strong assumption in some cases, and you might consider using the type=csh residual option in the RANDOM statement in PROC GLIMMIX to fit something similar.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 13:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758380#M36914</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2021-07-30T13:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Handling heteroskedasticity in Glimmix regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758418#M36921</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60873"&gt;@jiltao&lt;/a&gt;&amp;nbsp;'s recommendation to use type=csh is spot on for the type of heterogeneity of variance between time points.&amp;nbsp; If you wish to model correlated heterogeneity, type=arh(1) works well for data that has timepoints equally spaced in time.&amp;nbsp; If they are not equally spaced, the csh structure or the&amp;nbsp; heterogeneous Toeplitz (toeph) come to mind.&amp;nbsp; If you have sufficient data, an unstructured covariance matrix will readily accommodate heterogeneity and non-constant correlation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT:&lt;/P&gt;
&lt;P&gt;If you want a linear exponential autoregressive structure, SAS/STAT15.1 also has sp(lear)(time) {not timecat].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 15:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758418#M36921</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-07-30T15:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Handling heteroskedasticity in Glimmix regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758868#M36951</link>
      <description>&lt;P&gt;Thank you kindly!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 18:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Handling-heteroskedasticity-in-Glimmix-regression/m-p/758868#M36951</guid>
      <dc:creator>dsuchoff1</dc:creator>
      <dc:date>2021-08-02T18:24:18Z</dc:date>
    </item>
  </channel>
</rss>

