Discriminant How To

18
Discriminant Function Analysis in SPSS To do DFA in SP SS, start from “Classify” in the “Analyze” menu (beca use we’re trying to classify participants int o different groups). In this case we’r e looking at a dataset that des cribes children with ADHD. Research tells us that t he degree of symptom impairment in childhood disorders is often in the eye of the beholder—some adults may think that a child has difficulty  behaving, and other adults may not see it as a problem. For instance mothers (who are still most often the child’s primary caregiver) may think that a child has difficulty sitting still, while fathers (who may see the child primarily in less-structured “play” settings) may believe the behavior is “just kids being kids.” We’re going to look at whether the symptoms reported on four different measures (q1, q2, q3, and q4) can tell us whether those symptom ratings were provided by the child’s mother (“parent” = 1) or by the child’s father (“parent” = 2).

Transcript of Discriminant How To

Page 1: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 1/18

Discriminant Function Analysis in SPSS

To do DFA in SPSS, start from “Classify” in the “Analyze” menu (because we’re trying toclassify participants into different groups). In this case we’re looking at a dataset that describes

children with ADHD. Research tells us that the degree of symptom impairment in childhood

disorders is often in the eye of the beholder—some adults may think that a child has difficulty

 behaving, and other adults may not see it as a problem. For instance mothers (who are still mostoften the child’s primary caregiver) may think that a child has difficulty sitting still, while fathers

(who may see the child primarily in less-structured “play” settings) may believe the behavior is

“just kids being kids.” We’re going to look at whether the symptoms reported on four differentmeasures (q1, q2, q3, and q4) can tell us whether those symptom ratings were provided by the

child’s mother (“parent” = 1) or by the child’s father (“parent” = 2).

Page 2: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 2/18

In the dialog box, put in “parent” as the “grouping variable” (in other words, the variable that

you think defines different groups—your criterion variable for the analysis). It will appear in the box with two question marks after it—you have to tell SPSS what the codes are for the two

groups that you want to compare. Hit “Define Range” and type in “1” and “2” as the different

values of the “parent” variable that you want to compare. Then hit “Continue” to go on.

Page 3: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 3/18

 Now put the four “question” variables (q1-q4) in as the predictors (“independents”):

Hit the “Statistics” button to go on.

Page 4: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 4/18

This sub-dialog box lets you see descriptive statistics on each predictor variable for the different

groups. Let’s check “Means” to see some basic descriptive stats. 

Hit “Continue” to go back to the main dialog box.

Then, in the main dialog box, hit the “Classify” button to see the next sub-dialog.

Page 5: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 5/18

Here’s the sub-dialog that you get when you hit the “Classify” button:

On this screen, check the box for the “summary table.” This will give you the classification table(sensitivity, specificity, etc.) on your printout.

Hit “Continue” to go back to the main dialog box, and then hit “OK” to see the results of your

analysis.

Page 6: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 6/18

Here are the results:

 Anal ysis Case Processi ng Summary 

Unweighted Cases N Percent

Valid 89 97.8

Excluded Missing or out-of-range group codes 0 .0

 At least one missing discriminating

variable

2 2.2

Both missing or out-of-range group

codes and at least one missing

discriminating variable

0 .0

Total 2 2.2

Total 91 100.0

 

This table just tells you if there’s any missing data.

Group Statistics 

Mother or Father?

Mean Std. Deviation

Valid N (listwise)

Unweighted Weighted

Father Question 1 1.54 .519 13 13.000

Question 2 1.00 .000 13 13.000

Question 3 1.92 1.038 13 13.000

Question 4 1.62 .870 13 13.000

Mother Question 1 2.41 .819 76 76.000

Question 2 2.67 .598 76 76.000

Question 3 2.17 .915 76 76.000

Question 4 1.82 .905 76 76.000

Total Question 1 2.28 .839 89 89.000

Question 2 2.43 .810 89 89.000

Question 3 2.13 .932 89 89.000

Question 4 1.79 .898 89 89.000

 

This table shows the means that we asked for—it gives means on each variable for people in

each sub-group, and also the overall means on each variable.

Page 7: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 7/18

Summary of Canonical Discriminant Functions

Eigenvalues  

Function

Eigenvalue % of Variance Cumulative %

Canonical

Correlation

dimension0

1 1.387a  100.0 100.0 .762

a. First 1 canonical discriminant functions were used in the analysis.

This table tells you something about the “latent variable” that you’ve constructed (i.e., thediscriminant function), which helps you to differentiate between the groups. For more about

eigenvalues, see the website information on the topic of Factor Analysis.

Wilks' Lambda 

Test of Function(s) Wilks' Lambda Chi-square df Sig.

dimension0

1 .419 73.945 4 .000

 

Here’s the multivariate test—Wilks’ lambda, just like in MANOVA. Because p < .05, we cansay that the model is a good fit for the data. This multivariate test is a goodness of fit  statistic,

 just like the F -test is for regression.

Standardized Canonical

Discriminant Function

Coefficients 

Function

1

Question 1 .149

Question 2 1.007

Question 3 .049

Question 4 .382

These “discriminant function coefficients” work just like the beta-weights in regression. Based

on these, we can write out the equation for the discriminant function:

DF = .149*q1 + 1.007*q2 + .049*q3 + .382*q4

Using this equation, given someone’s scores on q1, q2, q3, and q4, we can calculate their score

on the discriminant function. To figure out what that DF score means, look at the group

centroids, below. 

Page 8: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 8/18

 

Structure Matrix 

Function

1

Question 2 .914

Question 1 .336

Question 3 .081

Question 4 .068

Pooled within-groups correlations

between discriminating variables

and standardized canonical

discriminant functions

Variables ordered by absolute

size of correlation within function.

Ignore this table—it tells you the correlation between each item and the discriminant function,

 but we won’t use it for anything here. Make sure that you aren’t  looking at the “structurematrix” when you get the coefficients for the discriminant function. Those come from the table

called “standardized canonical discriminant function coefficients” (which looks a lot like this

one, but isn’t the same).

Functions at Group Centroids 

Mother or Father? Function

1

dimension0

Father -2.815

Mother .482

Unstandardized canonical discriminant

functions evaluated at group means

Here are the group centroids. If someone’s score on the discriminant function is closer to –2.815, then those answers were probably the child’s father. If the person’s score on the DF is

closer to .482, then the data probably came from the child’s mother. In practical terms, we

usually figure out which group a person is in by calculating a cut score halfway between the two

centroids:

Cut Score = (-2.815 + .482) / 2 = -1.167

If an individual person’s score on the DF (calculated by plugging in their scores on q1, q2, q3,

and q4 to the DF equation we wrote out above) is above –1.167, then they were probably the

child’s mother. If their DF score is below –1.167, then they were probably the child’s father.

Page 9: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 9/18

Classification Statistics

Classification Processing Summary 

Processed 91

Excluded Missing or out-of-range group codes 0

 At least one missing discriminating

variable

2

Used in Output 89

 

Prior Probabilities for Groups 

Mother or Father?

Prior

Cases Used in Analysis

Unweighted Weighted

dimension0

Father .500 13 13.000

Mother .500 76 76.000

Total 1.000 89 89.000

 

Classification Resultsa 

Mother or Father? Predicted Group Membership

TotalFather Mother

Original Count

dimension2

Father 13 0 13

Mother 6 70 76

%

dimension2

Father 100.0 .0 100.0

Mother 7.9 92.1 100.0

a. 93.3% of original grouped cases correctly classified.

Here’s the classification table that we got by selecting that option in the SPSS dialog box. Like

the table shown in this week’s class notes, it gives information about actual group membershipvs. predicted  group membership.

--Overall % correctly classified = 93.3%--Sensitivity = 13 / 13 = 100%

--Specificity = 70 / 76 = 92.1%

Looking at the columns in this table instead of the rows, you can also calculate PPV and NPV:--PPV = 13 / (13+6) = 68.4%

--NPV = 70 / 70 = 100%

Page 10: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 10/18

 Now let’s go back to the main dialog box for DFA, and try a stepwise procedure instead.

The only change needed is to change this radio button to “use stepwise method.” Now SPSS willselect the best predictor or set of predictors from the four original possibilities.

Page 11: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 11/18

If you click on the “Method” button (which was grayed-out before, but becomes active once you

select “Use Stepwise Method”), you will see the following dialog box. Take a look at it—it tellsSPSS how to do the steps, and when to stop adding steps. Just leave everything here on its

default settings—no need to make any changes.

Hit “Continue” here, and then “OK” in the main dialog box to see your results.

Page 12: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 12/18

Page 13: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 13/18

Page 14: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 14/18

Page 15: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 15/18

One last step—let’s get a graph of the different groups, based on the two best predictors (q2 and

q4). This gives us a visual representation that shows how the two groups separate out from oneanother using these two predictors.

Graphs are found in the “Graphs” menu in SPSS. We’ll use a scatterplot to show the

differentiation between the two groups. Newer versions of SPSS (v16.0 and higher) have aninteractive “chart builder” format for graphs, but I find it easier to create graphs using the

individual dialog boxes for specific types of graphs. These are similar to the way SPSS produced

graphs in versions 15.0 and lower, and can be found under the “Legacy Dialogs” submenu.

Page 16: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 16/18

This box appears. Leave the graph set on “Simple,” and hit the “Define” key to go on.

Page 17: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 17/18

Here’s the dialog box where you enter variables for the graph. Put q2 and q4 on the two axes of

the graph ( y and x-axes: it doesn’t really matter which one goes on which axis, but if you setthem up this way, your graph will look the same as mine. If you reverse them, it will look like

my graph turned on its side. Either way is correct).

The “Set Markers By…” command lets you show the two different groups on the DV (mothers

vs. fathers) in two different colors on the graph. This is how you will be able to see thedifferentiation between the two groups.

Hit “OK” to see the output.

Page 18: Discriminant How To

8/10/2019 Discriminant How To

http://slidepdf.com/reader/full/discriminant-how-to 18/18

Here’s the graph:

You can see on this graph how the two groups are visually separated from one another, based on people’s answers to q2 and q4.  Not all discriminant functions will separate groups this perfectly.

Sometimes you can find predictors that statistically differentiate between the groups, while the

graphical representation still shows the groups as pretty jumbled together.

Paul F. Cook, University of Colorado Denver, Center for Nursing ResearchRevised 1/10 with SPSS (PASW) version 18.0

Members of Group 1

Members of Group 2