proc genmod with gee error

Accepted Solution Solved
Reply
Contributor
Posts: 44
Accepted Solution

proc genmod with gee error

Hello. I am running an analysis (proc genmod with gee) to analyze correlated outcomes -- repeated hospital encounters within a patient. My code is giving errors when a certain variable is added to the model, and I'm not sure what it going on. Please see below. Any thoughts as to why there are errors (see below) --  sample size is too small? Any other thoughts? thanks

 

This code is working fine:

proc genmod data = ip;
class id race payor sex urban psych;
model hpsy=race payor sex urban los psych/ dist=bin link=logit;
repeated subject=id/ type=exch covb corrw;
estimate 'black' race -1 1 0/exp;
estimate 'hispanic' race -1 0 1/exp;
run;

 

This code is NOT working:

proc genmod data = ip;
class id race payor sex urban psych county;
model hpsy=race payor sex urban los psych county/ dist=bin link=logit;
repeated subject=id/ type=exch covb corrw;
estimate 'black' race -1 1 0/exp;
estimate 'hispanic' race -1 0 1/exp;
run;

 

error message in log:

NOTE: Class levels for some variables were not printed due to excessive size.

NOTE: PROC GENMOD is modeling the probability that hpsy='1'.

WARNING: The negative of the Hessian is not positive definite. The convergence is questionable.

WARNING: The procedure is continuing but the validity of the model fit is questionable.

WARNING: The specified model did not converge.

WARNING: Negative of Hessian not positive definite.

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.

 

 

 

 


Accepted Solutions
Solution
‎02-18-2018 06:08 PM
Super User
Posts: 10,778

Re: proc genmod with gee error

You have too many levels for COUNTY. I think you should put it on SUBJECT.

 

Make a variable :

id_county=id||county;

 

And make it as subject:
repeated subject=id_county/ type=exch covb corrw;

View solution in original post


All Replies
Solution
‎02-18-2018 06:08 PM
Super User
Posts: 10,778

Re: proc genmod with gee error

You have too many levels for COUNTY. I think you should put it on SUBJECT.

 

Make a variable :

id_county=id||county;

 

And make it as subject:
repeated subject=id_county/ type=exch covb corrw;

Contributor
Posts: 44

Re: proc genmod with gee error

Thank you. That was the problem, the model converged. 

Thanks again.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 281 views
  • 0 likes
  • 2 in conversation