FILENAME goptions URL "http://192.38.117.59/~linearpredictors/datafiles/goptions.sas"; %include goptions; FILENAME url URL "http://192.38.117.59/~linearpredictors/datafiles/readFibrosis.sas"; %include url; ods output Estimates=or23vs01; data fibrosis; set fibrosis; log2ykl40=log2(ykl40); log2p3np=log2(p3np); log2ha=log2(ha); fibrosis3=(stage>2); fibrosis23=(stage>1); fibrosis123=(stage>0); RUN; ods output Estimates=or3vs012; title 'Estimates from table on the last page'; proc genmod data=fibrosis descending; model fibrosis3=log2ha log2p3np log2ykl40 / dist=binomial link=logit; estimate 'log2ha OR' log2ha 1 / exp; estimate 'log2p3np OR' log2p3np 1 / exp; estimate 'log2ykl40 OR' log2ykl40 1 / exp; run; quit; ods output Estimates=or23vs01; title 'Estimates from table on the last page'; proc genmod data=fibrosis descending; model fibrosis23=log2ha log2p3np log2ykl40 / dist=binomial link=logit; estimate 'log2ha OR' log2ha 1 / exp; estimate 'log2p3np OR' log2p3np 1 / exp; estimate 'log2ykl40 OR' log2ykl40 1 / exp; run; quit; ods output Estimates=or123vs0; title 'Estimates from table on the last page'; proc genmod data=fibrosis descending; model fibrosis123=log2ha log2p3np log2ykl40 / dist=binomial link=logit; estimate 'log2ha OR' log2ha 1 / exp; estimate 'log2p3np OR' log2p3np 1 / exp; estimate 'log2ykl40 OR' log2ykl40 1 / exp; run; quit; DATA or3vs012; SET or3vs012; threshold='3 vs. 012'; type=substr(Label,1,3); RUN; DATA or23vs01; SET or23vs01; threshold='23 vs. 01'; type=substr(Label,1,3); RUN; DATA or123vs0; SET or123vs0; threshold='123 vs. 0'; type=substr(Label,1,3); RUN; data estimates; set or3vs012 or23vs01 or123vs0; type=substr(Label,1,3); RUN; title 'ORs with confidence intervals'; PROC PRINT DATA=estimates; where type='Exp'; VAR Label threshold LBetaEstimate LBetaLowerCL LBetaUpperCL; RUN; endsas