Previous Page | Next Page

The KDE Procedure

Example 45.6 Bivariate KDE Graphics

This example illustrates the available bivariate graphics in PROC KDE. The octane data set comes from Rodriguez and Taniguchi (1980), where it is used for predicting customer octane satisfaction by using trained-rater observations. The variables in this data set are Rater and Customer. Either variable might have missing values. Refer to the file kdex3.sas in the SAS Sample Library. The following statements create the octane data set:


data octane;
   input Rater Customer;
   label Rater    = 'Rater'
         Customer = 'Customer';
datalines;
94.5 92.0
94.0 88.0
94.0 90.0

   ... more lines ...   

88.0 84.0
  .H 90.0
;

The following statements request all the available bivariate plots in PROC KDE:

ods graphics on;
proc kde data=octane; 
   bivar Rater Customer / plots=all;
run;
ods graphics off;

Output 45.6.1 shows a scatter plot of the data, Output 45.6.2 shows a bivariate histogram of the data, Output 45.6.3 shows a contour plot of bivariate density estimate, Output 45.6.4 shows a contour plot of bivariate density estimate overlaid with a scatter plot of data, Output 45.6.5 shows a surface plot of bivariate kernel density estimate, and Output 45.6.6 shows a bivariate histogram overlaid with a bivariate kernel density estimate. These graphical displays are requested by specifying the ODS GRAPHICS statement and the PLOTS= option in the BIVAR statement. For general information about ODS Graphics, see Chapter 21, Statistical Graphics Using ODS. For specific information about the graphics available in the KDE procedure, see the section ODS Graphics.

Output 45.6.1 Scatter Plot
 Scatter Plot

Output 45.6.2 Bivariate Histogram
 Bivariate Histogram

Output 45.6.3 Contour Plot
 Contour Plot

Output 45.6.4 Contour Plot with Overlaid Scatter Plot
 Contour Plot with Overlaid Scatter Plot

Output 45.6.5 Surface Plot
 Surface Plot

Output 45.6.6 Bivariate Histogram with Overlaid Surface Plot
 Bivariate Histogram with Overlaid Surface Plot

Previous Page | Next Page | Top of Page