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
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;
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;
Thanks a lot
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.