UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

SAS Data Analysis Examples
Discriminant Function Analysis

Examples of Discriminant Function Analysis

Example 1. A researcher has collected data on three psychological variables, four academic variables (standardized test scores) and gender for 600 college freshman. She is interested in how the set of psychological variables relates to the academic variables and gender. In particular, the researcher is interested in how many dimensions are necessary to understand the association between the two sets of variables.

Example 2. There is Fisher's (1936) classic example of discriminant analysis involving three varities of iris and four predictor variables (petal width, petal length, sepal width, and sepal length). Fisher not only wanted to determine if the varieties differed significantly on the four continuous variables but he was also interested in predicting variety classification for unknown individual plants.

Description of the Data

Let's pursue Example 1 from above.

We have a data file, discrim.sas7bdat, with 244 observations on four variables. The psychological variables are outdoor interests, social and conservative. The categorical variable is job type with three levels; 1) customer service, 2) mechanic, and 3) dispatcher.

Let's look at the data.

Some Strategies You Might Be Tempted To Try

Before we show how you can analyze this with a discriminant function analysis, let's consider some other methods that you might use.

SAS Discriminant Function Analysis

We will run the discriminant analysis using SAS' proc candisc. We could also have used proc discrim with the appropriate options and obtained the same results. Please note that we will not be using all of the output that SAS provides nor will the output be presented in the same order as it appears. There is still a lot of output remaining so we will comment at various places along the way.

There are two discriminant dimensions both of which are statistically significant. The canonical correlations for the dimensions one and two are 0.72 and 0.49 respectively.

The standardized discriminant coefficients function in a manner analogous to standardized regression coefficients in OLS regression. For example, a one standard deviation increase on the outdoor variable will result in a .32 standard deviation decrease in the predicted values on discriminant function 1. The canonical structure, also known as canonical loading or discriminant loadings, represent correlations between observed variables and the unob served discriminant functions (dimensions). The discriminat functions are a kind of latent variable and the correlations are loadings analgous to factor loadings.

The output includes the means on the discriminant functions for each of the three groups and a classification table. Values in the diagonal of the classification table reflect the correct classification of individuals into groups based on their scores on the discriminant dimensions.

Next, we will plot a graph of individuals on the discriminant dimensions. Due to the large number of subjects we will shorten the labels for the job groups to make the graph more legible. As long as we don't save the dataset these new lables will not be made permanent.

As you can see the customer service people tend to be a the more social (negative) end of dimension 1 and dispatchers at the opposite end with mechanics in the middle. On dimension 2 the results are not as clear, however the mechanics tend to be higher on the outdoor dimension and customer service and dispatchers lower.

Sample Write-Up of the Analysis

There is a lot of variation in the write-ups of discriminant function analyses. The write-up below is fairly minimal, including only the tests of dimensionality and the standardized coefficients. Typically, one does not include raw coefficients with standard errors and Wald tests of significance.

Tests of dimensionality for the discriminant analysis, as shown in Table 1, indicate that both of the dimensions are statistically significant. The F-tests associated with each dimension are exact. Dimension 1 had a canonical correlation of 0.72 between the response variables and the job classification, while for dimension 2 the canonical correlation was lower at 0.49.

Table 2 presents the standardized canonical coefficients for both dimensions. The first discriminant dimension is positively weighted by outdoor (0.38) and conservation (0.52 and strongly negative on social (-0.83). The second discriminant dimenstion is dominated by the outdoor variable (0.93). These results are interpreted to indicate that the first dimension reflects a bipolar social/non-social dimension while the second is an outdoor/non-outdoor dimension.

Cautions, Flies in the Ointment

  • Multivatiate normal distribution assumptions holds for the response variables.
  • Discrtiminant function analysis is not recommended for small samples.
  • See Also

     

    How to cite this page

    Report an error on this page

    UCLA Researchers are invited to our Statistical Consulting Services
    We recommend others to our list of Other Resources for Statistical Computing Help
    These pages are Copyrighted (c) by UCLA Academic Technology Services


    The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California