Scatterplots

A scatterplot is useful in determining the relationship between two continuous variables. It is constructed simply by plotting the response Y variable (vertical axis) against the explanatory X variable (horizontal axis). Once constructed, one should look for what type of relationship exists. For example, is it positive or negative? Is it linear or does it appear to be exponential or quadratic? Is the variance from the fitted curve positive or does it change as the X's change?

The procedure we use is PROC GPLOT. The format of PROC GPLOT is,

PROC GPLOT data=library.datafile;
PLOT the two variables to be plotted against each other;
RUN;

Example

Suppose there was interest in the relationship between price and the size of the house (in square feet) for the houses dataset. The program we would write is,
PROC GPLOT data=sasuser.houses;
PLOT price sqfeet;
RUN;
SAS will output sonething similar to this,

| Doing this in ASSIST | Doing this in INSIGHT |