BookmarkSubscribeRSS Feed
lisahoward
Calcite | Level 5

I am trying to create the following table below and am struggling on where to start:

Mock Table1: Treatment Difference in the Headache rate during 90 , 180 and 270 days follow-up period  between treated Untreated group (using Poisson Regression)

Headache Incidence Rate UnadjustedAdjusted
TreatedNot TreatedRR95% CIP valueRR95% CIP value
N=xxxN=xxx
n%n%
xxx.xxxxx.xxxx.xxxx.xx-xx.xx.xxxxxx.xxxx.xx-xx.xx.xxxx

* there will be three rows in total one for 90 days one for 180 days and one for 270 days.

N=number of Subjects;

RR=risk ratio (treated vs. untreated); CI=confidence interval for the RR; RR, 95% CI and p value are from the poisson model.

Unadjusted  model:  Headache rate = Exposure Group;

Adjusted model: Headache rate  =Exposure Group + Age+ index year


I know (or think)  I have to use Proc Genmod , but I have never used this procedure before and I am unsure of the syntax used to  get the RR CI and P values, or the adjusted and unadjusted stats.

The dataset I am using has the  all subjects  their exposure, age, index year , flag for headache (0/1) and headache diagnosis date. I am not bothered about the cosmetics of the table format tI can figure that bit out, it is the information inside the table that I need help with


Any help would be gratefully received .  Many thanks in advance, Lisa.

4 REPLIES 4
Lida
Obsidian | Level 7

Hi Lisa, how many exposure groups do you have? Is it a categorical
variable? Is Age continuous?

If you data are coded in this way:


 

Headache


 

 

Person


 

 

Exposure (Treated (2) Vs untreated (1)


 

 

Age


 

 

Year


 

 

1


 

 

1


 

 

1


 

 

29


 

 

2005


 

 

0


 

 

1


 

 

1


 

 

40


 

 

2001


 

 

1


 

 

1


 

 

2


 

 

45


 

 

2015


 

I believe you can do this to populate your table:

*to populate N fields;

proc freq data=datasetname;

tables Headache*Exposure;

run;

*Unadjusted RR;

proc genmod data=datasetname descending;

class Exposure ;

model Headache =Exposure/ offset=Person dist=p link=log type3;

estimate ' 1 Vs 2' Exposure 1 -1;*Unadjusted RR;

run;

proc genmod data=datasetname descending;

class Exposure Year;

model Headache =Exposure Age Year/offset=Person dist=p link=log type3;

estimate ' 1 Vs 2' Exposure 1 -1; *Adjusted RR;

run;

lisahoward
Calcite | Level 5

Hello, thank you so much for your response.  There is one exposure group ( flag = 1) and one untreated group (flag =0).  Age is a continuous variable but i may have to add some discrete variables into the adjusted model such as various comorbids  e.g. Diabetes etc ( all have a 1 or 0  flag).  Would I just add these into the class line of the code and the model line of the code for the adjusted part? May I ask what the line of code does (in particular  the -1 bit?

estimate ' 1 Vs 2' Exposure 1 -1; *Adjusted RR


I really appreciate all your help and you taking the time to respond.


Many thanks,


Lisa

Lida
Obsidian | Level 7

I think if your variables are coded as dummy vars (1/0) than
you do not need to declare them in class statement. SAS will understand it.
Only Year than should be kept in class statement. In the case of dummy
variables I am not sure if this statement below will work (try it). This
statement allows to estimate a contrast (RR) : group 1 versus 2.

   

estimate' 1 Vs 2' Exposure 1 -1;

lisahoward
Calcite | Level 5

Apologises for the time delay with regards to my response but I have a quick question regarding the offset  statement which =Person.  What is the variable 'Person representing' Is this variable holding the total number of patients who had an outcome for that particular exposure? Many thanks.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 1653 views
  • 0 likes
  • 2 in conversation