See "Tests for Smoothing Components" and "Degrees of Freedom" in the Details section which explains the two degrees of freedom. The contour plot shows how the bivariate spline for Latitude and Longitude used in the model to predict the response changes as a function of Latitude and Longitude. When you ask about the confusion matrix, I assume you mean for a model on a binary response variable like in the second (logistic) example. You can do that by requesting the predicted probabilities of the event from the OUTPUT statement as shown in the second run of GAMPL in the second example. Using the output data set, create a predicted response categorical by comparing the predicted probability to whatever cutoff value you want to use. For example, if the cutoff is to be 0.5:
proc gampl data=Diabetesstudy seed=12345;
model result(event='1') = spline(Glucose)
spline(Pedigree) spline(Age) / dist=binary;
output out=out;
id Diabetes Test;
run;
data out; set out;
pd=(pred>.5);
run;
proc freq;
table pd*diabetes;
run;
... View more