BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dsuchoff1
Calcite | Level 5

Greetings,

I am having a hard time finding out how to specify an error heteroskedasticity model using Glimmix to run a mixed regression. 

I found this resource from UCLA, which shows how it can be done in Mixed; however, the authors use the local option in the repeated statement to specify that variance depends on the level of the dependent variable. I do not see the local option in Glimmix.

The authors give the following code as an example:

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;

How might this be conducted using Glimmix? 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

the LOCAL= option is not available in the RANDOM statement in PROC GLIMMIX, so you cannot fit the same model in PROC GLIMMIX, unfortunately.

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.

View solution in original post

3 REPLIES 3
jiltao
SAS Super FREQ

the LOCAL= option is not available in the RANDOM statement in PROC GLIMMIX, so you cannot fit the same model in PROC GLIMMIX, unfortunately.

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.

SteveDenham
Jade | Level 19

@jiltao 's recommendation to use type=csh is spot on for the type of heterogeneity of variance between time points.  If you wish to model correlated heterogeneity, type=arh(1) works well for data that has timepoints equally spaced in time.  If they are not equally spaced, the csh structure or the  heterogeneous Toeplitz (toeph) come to mind.  If you have sufficient data, an unstructured covariance matrix will readily accommodate heterogeneity and non-constant correlation.

 

EDIT:

If you want a linear exponential autoregressive structure, SAS/STAT15.1 also has sp(lear)(time) {not timecat].

 

SteveDenham

dsuchoff1
Calcite | Level 5

Thank you kindly!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 662 views
  • 0 likes
  • 3 in conversation