* The auto vs. bus decision ; data two; infile 'c:\document\sas\table9.4' ; input auto bus x y; proc probit; class y; model y=x; output out=three xbeta=index prob=phat; proc print; * Greene's voting example, Exercise 9.9 from Undergraduate Econometrics ; data three; infile 'c:\document\sas\vote.asc' firstobs=2; input state $ DEM REP income school urban region ; income=income/1000; if (dem-rep<0) then v=1; else v=0; * Note: proc probit reverses signs ; * Therefore, the data have been reverse coded; * P(I)=Prob(Vote=demo); if region=2 then r1=1; else r1=0; if region=3 then r2=1; else r2=0; if region=4 then r3=1; else r3=0; proc probit; class v; model v=income school urban r2 r3; output out=four xbeta=index prob=cdf ; data five; set four; pdf=(1/sqrt(2*3.141))*exp(-.5*index**2); proc print; run;