BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GKalema
Fluorite | Level 6

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I ran your programs at SAS 9.4m3 (SAS/STAT 14.2) and the warning does not appear. I assume that this was a problem in an earlier release that has been fixed. I don't know what version of SAS implemented this change, but Technical Support can provide you with that information, and probably additional details.

 

View solution in original post

3 REPLIES 3
Rick_SAS
SAS Super FREQ

I ran your programs at SAS 9.4m3 (SAS/STAT 14.2) and the warning does not appear. I assume that this was a problem in an earlier release that has been fixed. I don't know what version of SAS implemented this change, but Technical Support can provide you with that information, and probably additional details.

 

GKalema
Fluorite | Level 6

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

 

Rick_SAS
SAS Super FREQ

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.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2660 views
  • 0 likes
  • 2 in conversation