
LOESS REGRESSION 85
three-dimensional scatterplot is produced by these lines of code:
proc g3d data=plaza;
scatter income*grocery=entmt/ color="black";
run;
Here is the graph.
18
5.00
60
103
145
0.30
5.87
11.43
17.00
Entmt
11.67
18.33
25.00
Income
Grocery
To fit and plot the loess surface, they create a data set containing the grid points that
span the range of the data: 18 to 45 for income and 5 to 25 for grocery expenditure.
data grid points;
do income=18 to 145 by 1;
do grocery=5 to 25 by 1;
output;
end;
end;
run;
Next, the analysts run the loess procedure that creates a file named score results
containing predicted values for all the specified grid points.
proc loess data=plaza; ...