relrisk

Regular Contributor
Posts: 168

relrisk

Hi all,

I have 2 set of question

1) odds ratio using relrisk?

have data:

trt      res    COUNT

Trt1        1       54

Trt1        2       12

Trt2        1      120

Trt         2      103

i need Odds ratio trt1 over trt2 ? how can i acheive that?

2) i am using Clopper-Pearson method(freq binomial)

i got ouput 95CI%

trt1                                                                         trt2

(19.7, 41.5)                                (27.9, 40.8)

i got query back to me "trt2 group is beyond it point estimate ?, CI look not correct

what does that mean

Thanks

Sam

Super User
Posts: 20,731

Re: relrisk

Can you post the code you used?  And did you get an error?

For odds ratio can use proc logistic.

Regular Contributor
Posts: 168

Re: relrisk

hi Reeza,

the follwoign code is using to get odds ratio and Clopper-Pearson method for CI for response

i can use logistic, but dont know how to

For odds ratio:

ods output RelativeRisks=rr(where=(StudyType eq 'Case-Control (Odds Ratio)'));

proc freq data=have;

weight count;

tables trt*res/chisq relrisk;

run;

Clopper-Pearson method:

proc freq data=ci noprint;

tables grp/ binomial alpha = 0.05;

by trt ;

output binomial out=_ci;

run;

data final_ci

retain ci;

set _ci;

by trt;

lcl = round(100 * (1 - xu_bin),.1);

ucl = round(100 * (1 - xl_bin),.1);

ci = '   ('||put(lcl,4.1)||', '||put(ucl,4.1)||')';

run;

Thanks

Sam

SAS Employee
Posts: 308

Re: relrisk

The following computes the odd ratio and relative risk estimates:

data a; input

trt \$     res    COUNT; datalines;

Trt1        1       54

Trt1        2       12

Trt2        1      120

Trt2        2      103

;

proc freq;

weight count;

table trt*res/relrisk;

run;

The odds ratio estimate is 3.8625 = (54/12) / (120/103).

It can also be produced using PROC LOGISTIC:

proc logistic;

freq count;

class trt;

model res(event="1")=trt;

run;

Discussion stats
• 3 replies
• 264 views
• 0 likes
• 3 in conversation