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
- /
- PROC GENMOD ISSUE when computing the exact confide...

- 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

04-27-2017 08:25 AM

Dear All,

In calculating the relative risk and corresponding exact 95% confidence intervals via exact Poisson regression using a log-linear model, the following scenario works (note that number of cases in group 2 = 1486);

```
data have1; * number of cases in group 2 = 1486 ;
input total cases group all;
log_total = log(total);
datalines;
14660 1529 1 1
14645
```__1486__ 2 1
;run;

proc genmod data=have1 exactonly;
CLASS group(ref='1') all /PARAM=ref;
model cases=group all /DIST=poisson OFFSET=log_total LINK=log;
exact group /estimate outdist=dist ALPHA=0.05;
exactoptions statustime=10 method=NETWORK;
ODS OUTPUT ExactParmEst=estimate ExactTests=ExactTest;
RUN;

The relative risk, lower and upper confidence limits are got by exponentiating the variables "estimate", "LowerCL" and "UpperCL" in the "estimate" dataset output via ODS OUTPUT.

HOWEVER, with a very slight change (number of cases = 1485), a computational issue is encountered, namely, "WARNING: Invalid confidence interval detected and set to missing".

```
data have2; * number of cases in group 2 = 1485 ;
input total cases group all;
log_total = log(total);
datalines;
14660 1529 1 1
14645
```__1485__ 2 1
;run;
proc genmod data=have2 exactonly;
CLASS group(ref='1') all /PARAM=ref;
model cases=group all /DIST=poisson OFFSET=log_total LINK=log ;
exact group /estimate outdist=dist ALPHA=0.05;
exactoptions statustime=10 method=NETWORK;
ODS OUTPUT ExactParmEst=estimate ExactTests=ExactTest;
RUN;

What could be the issue here? Is this a potential bug in the genmod procedure? How can I solve this? I know a possible work-around is to set the reference group to *group(ref='2') *which results in the sign of the estimates being flipped. We can back-flip the sign of the estimates and get the needed RR, Lower and Upper limits by exponentiating. But this is just a work-around. What is the solution?

Many thanks in advance,

George

Accepted Solutions

Solution

04-27-2017
01:18 PM

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

04-27-2017 09:37 AM

All Replies

Solution

04-27-2017
01:18 PM

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

04-27-2017 09:37 AM

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

04-27-2017 01:28 PM

Thanks Rick. Indeed, this seems to be an issue in SAS versions 9.3M2 and lower (at least tested on 9.2 as well).

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

04-27-2017 01:34 PM

Glad you zeroed in on the problem. FYI, there have been five releases of SAS since SAS 9.3m2. There are some amazing features in SAS 9.4m4, not only in SAS/STAT but also in the graphics that are available in PROC SGPLOT. I hope you get a chance to upgrade to SAS 9.4m4 or (later this year) SAS 9.4m5.