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

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,

 

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

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

View solution in original post

5 REPLIES 5
SteveDenham
Jade | Level 19

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 

StatX
Calcite | Level 5

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,

 

SteveDenham
Jade | Level 19

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

StatX
Calcite | Level 5

Thanks Steve for your reply.

 

I have unfortunaltely other datasets which gave me the same results with warnings...

 

Best,

SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 9762 views
  • 0 likes
  • 2 in conversation