data credit; infile 'K:\german.data.txt'; input checking $ duration history $ purpose $ amount savings $ employ $ rate status $ debtors $ residence property $ age other_plans $ housing $ exist_cr job $ provide phone $ foreign $ goodbad; goodbad=goodbad-1; /* so good loan is 1 and a bad one is 0 */ nchecking=0; if checking = "A12" then nchecking=100; if checking = "A13" then nchecking=500; nhistory=0; if history="A32" then nhistory=1; if history="A33" then nhistory=2; if history="A34" then nhistory=3; nsavings=0; if savings="A61" then nsavings=50; if savings="A62" then nsavings=300; if savings="A63" then nsavings=750; if savings="A64" then nsavings=1500; nemploy=0; if employ="A71" then nemploy=.5; if employ="A72" then nemploy=2.5; if employ="A73" then nemploy=5.5; if employ="A74" then nemploy=10; njob=0; if job="A172" then njob=1; if job="A173" then njob=2; if job="A174" then njob=2; nphone=0; if phone="A192" then nphone=1; nforeign=0; if foreign="A202" then nforeign=1; * proc print; run; %include 'K:\categorical.to.dummy.creator.txt'; %dummy(dataset=credit,var=purpose status debtors property other_plans housing); %include 'K:\fsr_logistic.txt'; %fsr_logistic(dataset=credit_new,model= duration|amount|rate|residence|age|exist_cr|provide|nchecking|nhistory|nsavings|nemploy|njob|nphone|nforeign| debtors_1|debtors_2|housing_1|housing_2|other_plans_1|other_plans_2|property_1|property_2|property_3|purpose_1| purpose_2|purpose_3|purpose_4|purpose_5|purpose_6|purpose_7|purpose_8|purpose_9|status_1|status_2|status_3 @q, gamma=0.05,y=goodbad,method=1,terms=40); run;