OPTIONS ls=75 ps=50; DATA sasuser.hivnejm; INPUT cesarean tperiods adv_mdis lbw n_pairs nhivpos; t12=0; if tperiods=1.5 then t12=1; t3 =0; if tperiods=3 then t3 =1; LINES; 1 0 0 0 372 30 0 0 0 0 3850 652 1 0 1 0 28 5 0 0 1 0 303 74 1 0 0 1 110 17 0 0 0 1 767 196 1 0 1 1 27 4 0 0 1 1 114 40 1 1.5 0 0 41 0 0 1.5 0 0 441 49 1 1.5 1 0 23 3 0 1.5 1 0 186 33 1 1.5 0 1 7 0 0 1.5 0 1 83 22 1 1.5 1 1 10 3 0 1.5 1 1 54 19 1 3 0 0 124 2 0 3 0 0 878 49 1 3 1 0 34 1 0 3 1 0 208 24 1 3 0 1 25 0 0 3 0 1 109 11 1 3 1 1 8 1 0 3 1 1 38 6 ; proc freq; tables cesarean tperiods adv_mdis lbw; weight n_pairs; proc sort ; by tperiods; proc genmod; class tperiods; model nhivpos/n_pairs = cesarean t12 t3 adv_mdis lbw / link=logit dist = binomial; proc genmod; class tperiods; model nhivpos/n_pairs = cesarean t12 t3 adv_mdis lbw / link=log dist = binomial; run;