turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Erorr: Error in computing the variance function du...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-11-2015 01:09 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-13-2015 10:33 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-18-2015 02:37 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-19-2015 12:31 PM

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