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

Hi,

 

Can someone please help me with this question about how to compute IRR.

 

From my dataset, I have calculated  crude incidence rates for cases and controls using (numbers of events/ total person-years for each group).

 

And now I want to know if this association is significant.

 

I have a dataset with cases and controls according to disease status. For each ID I have


1.case/control status (1/0),
2. person-years contributed by each id
3. log person-years contributed by each ID
4. and number of events per ID.

 

Can someone please explain how can I calculate IRR and test for significance or if any more steps are needed? I have the log person-years variable because I was trying to run proc genmod but couldn't find information on how to run it in context of incidence rates.

 

I will be happy to provide more detail if needed.

 

Thankyou.

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

As shown in the note, the OFFSET= option specifies a variable in the DATA= data set that is the log of the person-time for each observation. The beginning of the note shows how using the log of person-time as an offset in the model allows you to model a rate.

View solution in original post

6 REPLIES 6
Ksharp
Super User

There is a function FINANCE('irr',  ) .

Or could try older function IRR() .

GreenTree1
Obsidian | Level 7
Thanks, Ksharp. I am looking into this as well
StatDave
SAS Super FREQ

See this note which discusses estimating rates and rate ratios using a log-linked Poisson model and LS-means in PROC GENMOD.

GreenTree1
Obsidian | Level 7

Thank you, Statdave

 

I went over the link that you had sent. Can you please clarify what is "ln" in the offset statement?  In the document, it is mentioned that 

"ln = log(n)"

In which case is it the log of the total person-time contributed by the entire cohort (cases and controls)? or the logs of the total person time contributed by each individual?

 

Here is the code that I have changed according to my data.

 

proc genmod data=mydata;
         class disease exposure;
         model outcome = disease exposure / dist=poisson link=log offset=(what is this?);
         run;

 I understand that I have to make some assumptions about the distribution of the outcome before I run this.

 

I appreciate your help.

StatDave
SAS Super FREQ

As shown in the note, the OFFSET= option specifies a variable in the DATA= data set that is the log of the person-time for each observation. The beginning of the note shows how using the log of person-time as an offset in the model allows you to model a rate.

GreenTree1
Obsidian | Level 7
It worked, thank you for the clarification.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 9266 views
  • 0 likes
  • 3 in conversation