options ps=60 ls=80 pageno=1 formdlim='_'; filename t1 'c:\esrd.dat'; data a; infile t1; input PUNEMPL $ HEMOGLOB AGE SEX $ RACE $ DIABETES HYPERTEN; ageg=0; if AGE le 23 then ageg = 1; if AGE ge 23 and AGE < 40 then ageg = 2; if AGE ge 40 and AGE < 50 then ageg = 3; if AGE ge 50 and AGE < 60 then ageg = 4; if AGE ge 60 and AGE < 70 then ageg = 5; if AGE ge 70 and AGE < 80 then ageg = 6; if AGE ge 80 then ageg = 7; if SEX = 'f' then gender=1; if SEX = 'm' then gender=0; if RACE = 'w' then RACE = 0; if RACE = 'b' then RACE = 1; if HYPERTEN = 1 then Y = 2; if HYPERTEN = 0 then Y = 1; if DIABETES = 0 and HYPERTEN = 0 then Y = 0; run; /* proc print data=a; var AGE gender ageg RACE Y; run; */ proc logistic data=a descending ; class RACE (ref='0') /param=ref; model Y (ref='0') = RACE / link=glogit scale=none aggregate; run; proc logistic data=a descending ; class RACE ; model Y (ref='0') = / link=glogit scale=none aggregate; run; proc logistic data=a descending ; class ageg (ref='7') gender (ref='0') RACE (ref='0') /param=ref; model Y (ref='0') = RACE ageg gender / link=glogit scale=none aggregate; run; proc logistic data=a descending ; class ageg (ref='7') gender (ref='0') /param=ref; model Y (ref='0') = ageg gender/ link=glogit scale=none aggregate; run; proc logistic data=a descending ; class RACE (ref='0') /param=ref; model Y (ref='0') = RACE / link=glogit scale=none aggregate; run; quit;