BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Liamb
Obsidian | Level 7

Hello,

I'm looking for SAS code to calculate the difference between two groups using the Generalized Estimating Equation (GEE) with normal distribution assumptions, log link functions, unstructured variance-covariance structure and stratification factor (strata).

I found the following code in the SAS help but it doesn't specify the variance-covariance structure and strata options

proc genmod data=nor;
   model y = x / dist = normal
                 link = log;
   output out       = Residuals
          pred      = Pred
          resraw    = Resraw
          reschi    = Reschi
          resdev    = Resdev
          stdreschi = Stdreschi
          stdresdev = Stdresdev
          reslik    = Reslik;
run;

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

Assuming that you want to use GEE because you have multiple observations or subjects within the strata and you want to allow for those responses to be correlated, then the following does the analysis you are suggesting. PROC GEE is the recommended procedure for fitting GEE models, though you could use the same syntax with GENMOD. But note that if the number of observations within a stratum is large, the model with the unstructured correlation matrix could be hard to estimate. Since GEE protects for incorrect structure, many just use simple structures like TYPE=IND or EXCH.

proc gee;
class strata group;
model y=group / link=log;
repeated subject=strata / type=un;
lsmeans group / diff;
run;

 

View solution in original post

2 REPLIES 2
StatDave
SAS Super FREQ

Assuming that you want to use GEE because you have multiple observations or subjects within the strata and you want to allow for those responses to be correlated, then the following does the analysis you are suggesting. PROC GEE is the recommended procedure for fitting GEE models, though you could use the same syntax with GENMOD. But note that if the number of observations within a stratum is large, the model with the unstructured correlation matrix could be hard to estimate. Since GEE protects for incorrect structure, many just use simple structures like TYPE=IND or EXCH.

proc gee;
class strata group;
model y=group / link=log;
repeated subject=strata / type=un;
lsmeans group / diff;
run;

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2 replies
  • 485 views
  • 0 likes
  • 2 in conversation