BookmarkSubscribeRSS Feed
statistician13
Quartz | Level 8

I am trying to build a model using generalized estimating equations (gee) in proc genmod to examine factors that may affect inpatient re-admissions (PTNT_RE_ADMIT_IND2) across a number of specifically selected facilities (NM), while controlling for a continuous, numerical measure of severity of illness (severity).  Patients (ptno) have multiple visit sequentially indicated by the variable visitindex.  My model is below.

proc genmod data=new.patientencounters descending;

class

        NM

        visitindex

        ptno;

model PTNT_RE_ADMIT_IND2 = severity NM /dist=bin link=logit type3 ;

repeated subject=ptno /within=visitindex corr=ar(1) corrw;

run;

When I run this very simple model, I continue to receive the following error message in the SAS Log:

NOTE: Algorithm converged.

ERROR: Error in computing the variance function.

ERROR: Error in parameter estimate covariance computation.

ERROR: Error in estimation routine.

I've tried everything I can think of to remedy this:  I've tried to take subsets of my data, I've tried collapsing categories of NM, I've examined cross-tabs to look for sparse tables and zero-cells (none are found), and I can't seem to resolve this error.  I performed a Google search for these errors and apparently it's not very common as I've only identified a handful of people who have reported this error or asked for help related to this error.  Indeed, I found one other poster in this forum with the questions, but there wasn't much information in that post to help resolve this. Does anyone have any suggestions?

Thanks.

3 REPLIES 3
SteveDenham
Jade | Level 19

This is just a wild guess, but it may be that visitindex is the culprit here.  If you have a lot of patients with only a single visit, the optimization routine is going to gag, and the correlation at later time points will dominate.  And if the continuous covariate 'severity' is closely aligned/correlated with the number of visits it would make it worse.

One thing to try would be to move over to GLIMMIX, and see what this gives.  Here is a conditional repeated measures model:

proc glimmix data=new.patientencounters method=laplace;

class NM visitindex  ptno;

model PTNT_RE_ADMIT_IND2 = severity NM  /dist=binary;

random visitindex/subject=ptno type=ar(1) gcorr;

run;

I have a hunch this will throw some error messages as well, but I know those messages better than the GENMOD ones.

The other would be to try PROC GEE, especially if you have missing values for visitindex.

Steve Denham


statistician13
Quartz | Level 8

So I think I found the culprit.  It appears that there were some patients that went to multiple facilities.  I discovered this when I attempted to verify that each patient (ptno) was in one facility only (NM).  During this analysis, I discovered this was not the case.  So, I simply modifed the repeated statement to be "repeated subject=ptno(NM)", treating each patient within a hospital separately.  This resolved the issue.

Hopefully this will be helpful to others who might encounter similar issues as this type of error seems to have relatively little coverage.

SteveDenham
Jade | Level 19

That is good to know.  If you had been doing this in GLIMMIX, the error would have been "Infinite likelihood in iteration 1"--so it is good to know the equivalent wording in GENMOD.

I don't know if you can, but if so, give yourself full credit for answering this one.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 6768 views
  • 4 likes
  • 2 in conversation