Hi everybody,
I used a GEE model for repeated measures to analyse the following data (CSV file attached):
. 2 groups, 5 days
. One binary response variable (yes/No).
The code is the following:
proc genmod data=DATASET rorder=internal descending; class GRP DAY ID; model TO_EXPLAIN = GRP DAY GRP*DAY / dist=bin link=logit type3; repeated subject=ID / type=ind withinsubject=DAY; run;
I have the following message errors:
NOTE: Algorithm converged. WARNING: The generalized Hessian matrix is not positive definite. Iteration will be terminated. ERROR: Error in parameter estimate covariance computation. ERROR: Error in estimation routine.
It seems that these erros come from the fact that no subject show the modality "Yes" on Day 5 in both groups. How can I analyse these data?
Thanks in advance for your help.
Best,
It would be nice if the complete separation always occurred at the last observation. Then you could truncate without too much trouble.
Most of what I have come across suggests analyzing without the separated data, but in a repeated measures design where we are really pretty certain that the responses/errors are correlated, that doesn't fly too well. One thing that might work is "coarsening" the repeats, where adjacent days are collapsed. Another is to try (and this might be hard) fitting a spline to the "non-separated" data points, in order to capture the time dependence in the covariance matrix.
Steve Denham
So long as your dataset is not huge, it may be that the EXACT statement is what you will need, based on some statements here:
http://www.ats.ucla.edu/stat/mult_pkg/faq/general/complete_separation_logit_models.htm
Try the following;
proc genmod data=DATASET rorder=internal descending; class GRP DAY ID; model TO_EXPLAIN = GRP DAY GRP*DAY / dist=bin link=logit type3;
EXACT grp day grp*day / joint estimate; repeated subject=ID / type=ind withinsubject=DAY; run;
Steve Denham
Hi Steve,
Thanks a lot for your reply, but it seems that the REPEATED statement is incompatble with EXACT.
ERROR: The following statements are not allowed with exact analyses:REPEATED
Best,
Shoot. But not really surprised, as there is a long list of options that EXACT doesn't play well with in GENMOD. I just didn't see REPEATED in there.
I can get a conditional repeated measures model to work for the first 5 days using GLIMMIX, but not a marginal model. This is a partcularly ill-conditioned dataset...
Steve Denham
Thanks Steve for your reply.
I have unfortunaltely other datasets which gave me the same results with warnings...
Best,
It would be nice if the complete separation always occurred at the last observation. Then you could truncate without too much trouble.
Most of what I have come across suggests analyzing without the separated data, but in a repeated measures design where we are really pretty certain that the responses/errors are correlated, that doesn't fly too well. One thing that might work is "coarsening" the repeats, where adjacent days are collapsed. Another is to try (and this might be hard) fitting a spline to the "non-separated" data points, in order to capture the time dependence in the covariance matrix.
Steve Denham
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.