GDA - Example 1: Stepwise Discriminant Analysis
This example illustrates model building in GDA using forward stepwise discriminant analysis. It is based on a classic example data file reported by Fisher (1936) that reports the lengths and widths of sepals and petals of three types of irises (Setosa, Versicol, and Virginic). The purpose of the analysis is to learn how we can discriminate between the three types of flowers, based on the four measures of width and length of petals and sepals.
The data file for this analysis is Irisdat.sta. The first two variables in this file (Sepallen, Sepalwid) pertain to the length and width of sepals; the next two variables (Petallen, Petalwid) pertain to the length and width of petals. The last variable in this file is a grouping or coding variable that identifies to which type of iris each flower belongs (Setosa, Versicol, and Virginic). In all, there are 150 flowers in this sample, 50 of each type.
Ribbon bar. Select the Home tab. In the File group, click the Open arrow and select Open Examples to display the Open a STATISTICA Data File dialog box. The Irisdat.sta data file is located in the Datasets folder. Then, select the Statistics tab. In the Advanced/Multivariate group, click Mult/Exploratory and from the menu, select General Discriminant to display the General Discriminant Analysis (GDA) Models Startup Panel.
Classic menus. From the File menu, select Open Examples to display the Open a STATISTICA Data File dialog box. The Irisdat.sta data file is located in the Datasets folder. Next, from the Statistics - Multivariate Exploratory Techniques submenu, select General Discriminant Analysis Models to display the General Discriminant Analysis (GDA) Models Startup Panel.
Select General discriminant analysis as the Type of analysis and Quick specs dialog as the Specification method. Then click the OK button to display the GDA General Discriminant Analysis dialog box.
On the Quick tab, click the Variables button to display the variable selection dialog box, and select Iristype as the Dependent variable. Select Sepallen, Sepalwid, Petallen, and Petalwid as Continuous pred. variables. Click the OK button.
In the GDA General Discriminant Analysis dialog box, select the Advanced tab, and select Forward stepwise as the Model building option.
Finally, click the OK button in the GDA General Discriminant Analysis dialog box to display the GDA Models Results dialog box.
GDA;
DEPENDENT = IRISTYPE ("SETOSA" "VIRGINIC" "VERSICOL");
COVARIATE = SEPALLEN SEPALWID PETALLEN PETALWID;
DESIGN = SEPALLEN + SEPALWID + PETALLEN + PETALWID;
MBUILD = FSTEPWISE;
P1ENTER = .05;
P2REMOVE = .05;
STEPCRIT = P;
- Reviewing Results
- On the
GDA Models Results - Quick tab, in the Model building results group box, click the Summary of stepwise results button to create a spreadsheet that contains the results at each step in the forward stepwise search.
See also GRM - Index.