/* Where did you drill on the square grid? (X,Y) Did you find water? W=(Y,N) */ %let libname=work; options symbolgen; Data a; ** Compute logit of water based on (X,Y); do x = 0 to 100; do Y = 0 to 100; L = -1 + .001*((x-10)**2 - .05*(x-30)**3 + 2*(x-40)*(Y-30) - 1.9*(y-30)**2); ** Compute probability of water & plot **; p = exp(L)/(1+exp(L));output; end; end; proc g3d; plot x*Y=L;plot x*Y=p; title "Theoretical Probability"; label L="Logit"; run; *(2) Compute 0-1 data for Pr{water}=f(X,Y) Create a data set for scoring as well (id=2); Data water; set a; W = (ranuni(123)