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

Hello,

I'm calculating confidence intervals for an incidence rate and came across this issue.

 

I have 8 events with a total follow-up time (days/years/log) of 69166/189.37/5.25. 

By hand, I would calculate the confidence intervals by using the equations (Poisson distribution, alpha=0.5):

ll = (CINV(0.05/2,2*n)/2)/(fu/365.25);
ul = (CINV((1-0.05/2),2*(n+1))/2)/(fu/365.25);

Being n=8 and fu=69166. I get 18.23 and 83.24 x10^-3 for the lower and upper confidence intervals.

 

Why don't I get the same result if I try to calculate these intervals by using proc genmod?

PROC GENMOD DATA = ir;
MODEL n = /dist=P OFFSET= lfu_year;
ESTIMATE "intercept" intercept 1;
RUN;

Assuming ir is a dataset with 1 row and 2 variables (n=8 and lfu_year=5.244)?.

I get 21.1 and 84.5 x10^-3 for the lower and upper confidence intervals.

 

Also, could you explain to me why we set the estimate "Intercept" at 1?

 

Thanks in advance,

 

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Check the GENMOD documentation. In the Details section, it gives the methods for calculating confidence intervals by the two available methods (likelihood ratio and Wald).  Neither of those use the closed formulas you present.

 

SteveDenham

View solution in original post

7 REPLIES 7
SteveDenham
Jade | Level 19

I can answer the second question.  In the ESTIMATE statement, the value entered is a multiplier of the value.  Think of a matrix product where L'(beta) is the estimate you want to calculate.  The entries in the matrix are what you enter into the ESTIMATE statement, so intercept 1 gives you 1*(beta hat for intercept).

 

SteveDenham

pmmalmeida
Fluorite | Level 6

Just to make sure I understand. By adding the ESTIMATE command I'm asking SAS to estimate beta0 in a model such as

       ln(Incidence_rate)=beta0

       or ln(n)=ln(fu)+beta0.

 

Am I correct?

StatDave
SAS Super FREQ

Yes. GENMOD fits the model g(mu)=X*Beta, where g() is the link function. So, with a log link, the model is ln(mu)=X*Beta, and for an intercept-only model with an offset, ln(off), the model is ln(mu)=Beta0+ln(off), or equivalently, ln(mu/off)=Beta0 so that Beta0 estimates the log rate. GENMOD provides a point estimate and confidence interval for the intercept, Beta0. The ESTIMATE statement estimates L*Beta, where L is the vector of coefficients you provide in the ESTIMATE statement. Exponentiating Beta0 and its confidence interval, as the ESTIMATE provides in the Mean columns, provides a point estimate and confidence interval for the rate. 

pmmalmeida
Fluorite | Level 6

Thanks! But, and I'm sorry if thats obvious, that does not explain the small difference in CI's I calculate right?

Shouldn't the GENMOD give the same results as the exact method confidence intervals for a poisson distribution or does SAS calculate the CI's for the intercept in a different way?

SteveDenham
Jade | Level 19

Check the GENMOD documentation. In the Details section, it gives the methods for calculating confidence intervals by the two available methods (likelihood ratio and Wald).  Neither of those use the closed formulas you present.

 

SteveDenham

StatDave
SAS Super FREQ

GENMOD is not a procedure specialized for estimating rates. It is a modeling procedure that fits a range of generalized linear models. The estimation methods it provides are in the modeling context. However, rate estimation can be done using a modeling approach by estimating the appropriate function of model parameters which is what the ESTIMATE statement does. This general estimation method is not the same as the method you showed. However, these two methods are likely to be equivalent asymptotically.

StatDave
SAS Super FREQ

In GENMOD, you are fitting a model and estimating a linear combination of the model parameters - in this case, just the intercept itself - and then obtaining an estimate on the mean scale by applying the inverse of the link function. As a result, the estimate and confidence interval for the rate are computed by exponentiating (the inverse of the link function in this case) the intercept and the endpoints of the confidence interval for the intercept. 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 7 replies
  • 1261 views
  • 11 likes
  • 3 in conversation