Programming the statistical procedures from SAS

proc GENMOD (repeated measures) / WARNING: The generalized Hessian matrix is not positive definite

Reply
New Contributor
Posts: 3

proc GENMOD (repeated measures) / WARNING: The generalized Hessian matrix is not positive definite

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,

 

Respected Advisor
Posts: 2,655

Re: proc GENMOD (repeated measures) / WARNING: The generalized Hessian matrix is not positive defini

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 

New Contributor
Posts: 3

Re: proc GENMOD (repeated measures) / WARNING: The generalized Hessian matrix is not positive defini

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,

 

Respected Advisor
Posts: 2,655

Re: proc GENMOD (repeated measures) / WARNING: The generalized Hessian matrix is not positive defini

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

New Contributor
Posts: 3

Re: proc GENMOD (repeated measures) / WARNING: The generalized Hessian matrix is not positive defini

Thanks Steve for your reply.

 

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

 

Best,

Respected Advisor
Posts: 2,655

Re: proc GENMOD (repeated measures) / WARNING: The generalized Hessian matrix is not positive defini

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

Ask a Question
Discussion stats
  • 5 replies
  • 967 views
  • 0 likes
  • 2 in conversation