Hi All!!!
I need to compute the relative risk for a 2x5 table, having the lowest group as the reference value.
Can anybody help me?
Thank you in advance
Antonio
/*
Relative Rick is only calculated for 2x2 tables.
2xK table I think you mean multiple 2x2 tables,
*/
data have;
call streaminit(123);
do page=1 to 20;
do obs=1 to 100;
row=rand('bern',0.4);
col=rand('bern',0.6);
output;
end;
end;
run;
proc freq data=have;
table page*row*col/relrisk(column=1) ;
run;
/*
Relative Rick is only calculated for 2x2 tables.
2xK table I think you mean multiple 2x2 tables,
*/
data have;
call streaminit(123);
do page=1 to 20;
do obs=1 to 100;
row=rand('bern',0.4);
col=rand('bern',0.6);
output;
end;
end;
run;
proc freq data=have;
table page*row*col/relrisk(column=1) ;
run;
Thank You very much Ksharp for Your prompt and clear reply!
Actually I have a binary outcome (0/1) and a categorical predictor with four mutually exclusive values (0/1/2/3).
When a run a proc freq, I obtain a 2x4 table.
Should I create different columns for each of the four values of the predictor variable?
Then should I run a proc freq as in Your example?
eg:
table outcome*pred1*pred2*pred3*pred4
?
Thank You in advance
trying to be clearer...
Binary outcome 0/1
Four class of renal damage A/B/C/D
I need to compute the RR for the outcome "1" in B vs A; C vs A; D vs A.
Hope is clearer now.
Similar to a proc logistic with A as the reference value. Only needing to compute RR instead of OR
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.