turn on suggestions

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 Syntax question

Topic Options

- 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

03-25-2015 10:44 AM

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 | Unadjusted | Adjusted | |||||||

Treated | Not Treated | RR | 95% CI | P value | RR | 95% CI | P value | ||

N=xxx | N=xxx | ||||||||

n | % | n | % | ||||||

xx | x.xx | xx | x.xx | xx.xx | xx.xx-xx.xx | .xxxx | xx.xx | xx.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.

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

03-27-2015 10:18 AM

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**;

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

03-27-2015 01:44 PM

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

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

03-27-2015 02:00 PM

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**;

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

04-24-2015 03:03 AM

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.