two-group discriminant function analysis. overview you wish to predict group membership. there are...

40
Two-Group Discriminant Function Analysis

Upload: martha-miller

Post on 18-Jan-2018

217 views

Category:

Documents


0 download

DESCRIPTION

The Discriminant Function Weights are chosen such that were you to compute D for each case and then use ANOVA to compare the groups on D, the ratio of SS between to SS within would be as large as possible. The value of this ratio is the eigenvalue.

TRANSCRIPT

Page 1: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Two-Group Discriminant Function Analysis

Page 2: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Overview

• You wish to predict group membership.• There are only two groups.• Your predictor variables are continuous.• You will create a discriminant function, D,

such that the two groups differ as much as possible on D.

Page 3: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

The Discriminant Function

• Weights are chosen such that were you to compute D for each case and then use ANOVA to compare the groups on D, the ratio of SSbetween to SSwithin would be as large as possible.

• The value of this ratio is the eigenvalue.

ppi XbXbXbaD 2211

Page 4: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Harass90.sav• Data are from

Castellow, W. A., Wuensch, K. L., & Moore, C. H. (1990). Effects of physical attractiveness of the plaintiff and defendant in sexual harassment judgments. Journal of Social Behavior and Personality, 5, 547‑562.

• Download from my SPSS Data page.• Bring into SPSS. Look at the data sheet.

Page 5: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous
Page 6: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

The Variables

• Verdict is mock juror’s recommendation, guilty (finding in favor of the plaintiff) or not (favor of defendant)

• d_excit through d_happy are ratings of the defendant on various characteristics.

• p_excit through p_happy are ratings of the plaintiff on the same characteristics.

Page 7: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Do the Analysis

• Click Analyze, Classify, Discriminant.• Put all 22 rating scales (d_excit through

p_happy) in the “Independents” box.• Put verdict into the “Grouping variable”

box.

Page 8: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Now click on “verdict(? ?)” and then on “Define Range.”

Page 9: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Enter “1” (Guilty) and “2” (Not) Click Continue.

Back on the initial page, click “Statistics.”

Page 10: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Check all of the Descriptives and Function Coefficients. Click Continue. Back on the initial page, click “Classify.”

Page 11: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Select “Compute from group sizes” for the Priors and “Summary Table” for Display. Click Continue. Back on the initial page, click “Save.”

Page 12: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Check “Discriminant scores” then click “Continue.” Back on the initial page, click “OK.”

Page 13: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Group Means

• Look at the Group Statistics.– Mean ratings of defendant are more favorable

in the Not Guilty group than in the Guilty group.

– Mean ratings of the plaintiff are more favorable in the Guilty group than in the Not Guilty group.

Page 14: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Univariate ANOVAs

• Look at the “Tests of Equality of Group Means.”– The groups differ significantly on all but four of

the variables.

Page 15: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Box’s M• Look at “Box’s Test of Equality of

Covariance Matrices.”• The null is that the variance-covariance

matrix for the predictors is, in the populations, the same in both groups.

• This is assumed when pooling these matrices during the DFA.

• Box’s M is very powerful.

Page 16: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

• We generally do not worry unless M is significant at .001.

• We may use elect to use Pillai’s Trace as the test statistic, as it is more robust to violation of this assumption.

• Classification may be more affected by violation of this assumption than are the tests of significance.

Page 17: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Eigenvalue andCanonical Correlation

• Look at the “Eigenvalues.”– The eigenvalue, 1.187, is

for comparing the groups on the discriminant function.

– The canonical correlation, .737, is

and is equivalent to eta from ANOVA on D or point-biserial r beteen Groups and D.

groupswithin

groupsbetween

SSSS

_

_ =

total

groupsbetween

SSSS _

Page 18: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Wilks’ Lambda

• This is

• 1 = eta-squared = 1 .457 = .543• Eta-squared = canonical corr squared

= .7372 = .543• The grouping variable accounts for 54% of

the variance in D.

total

groupswithin

SSSS _

Page 19: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Test of Significance

• The smaller , the more doubt cast on the null that the groups do not differ on D.

• Chi-square is used to test that null. It is significant. F can also be used.

• There are other multivariate tests (such as Pillai’s trace) available elsewhere.

Page 20: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Canonical Discriminant Function Coefficients

• SPSS gives us both the standardized weights

• And the unstandardized weights

ppi ZZZD 2211

ppi XbXbXbaD 2211

Page 21: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

DFC Weights vs Loadings

• The usual cautions apply to the weights – for example, redundancy among predictors will reduce the values of weights.

• The loadings in the structure matrix provide a better picture of how the discriminant function relates to the original variables.

Page 22: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

The Loadings

• These are correlations between D and the predictor variables.

• For our data, high D is associated with the defendant being rated as socially desirable and the plaintiff being rated as socially undesirable.

Page 23: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Standardized Weights vs Loadings

• The predictors with the largest standardized coefficients were D_sincerity, D_warmth, D_kindness, P_sincerity, P_strength, and P_warmth.

• The predictors with the highest loadings are D_sincerity and P_warmth.

• The standardized weight for D_warmth is negative but its loading positive, indicating suppression.

Page 24: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Group Centroids

• These are simply the group means on D.• For those who found in favor of the

defendant, D was high: + 1.491.• For those who found in favor of the

plaintiff, D was low: .785.

Page 25: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Bayes Rule

• For each case, probability of membership for each group is computed from the priors – p(Gi) – and the likelihoods – p(D|Gi).

g

iii

iii

GDpGp

GDpGpDGp

1

)|()(

)|()()|(

Page 26: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Classification

• Each case is classified into the group for which the posterior probability – p(Gi|D) – is greater.

• By default, SPSS uses equal priors – for two groups, that would be .5.

• We asked that priors be computed from group frequencies, which should result in better classification.

Page 27: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Prior Probabilities

• Look at “Prior Probabilities for Groups.”• As you can see, 65.5% of the subjects

voted Guilty, 34.5% Not Guilty.• Using this information should produce

better classification.

Page 28: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Fisher’s Classification Function Coefficients

• For each case, two scores are computed from the weight’s and the subject’s scores on the variables.

• D1 is the score for Group 1• D2 is the score for Group 2• If D1 > D2, the case is classified into

Group 1.• If D2 > D1, into Group 2.

Page 29: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Classification Results

• This table shows how well the classification went.

• Of the 95 subjects who voted Guilty, 85 were correctly classified – 89.5% success.

• Of the 50 subjects who voted Not Guilty, 43 were correctly classified – 86%.

• Overall, 88.3% were correctly classified.

Page 30: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

How Well Would We Have Done Just By Guessing?

• Random Guessing – for each case, flip a fair coin. Heads you predict Group 1, tails Group 2.

• P(Correct) = .5(.655) + .5(.345) = 50%

Page 31: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Probability Matching

• In a situation like this, human guessers tend to take base rates into account, guessing for one or the other option in proportion to how frequently those guesses are correct.

• P(Correct) = .655(.655) + .345(.345) = 55% correct.

Page 32: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Probability Maximizing

• In this situation goldfish guess the more frequent option every time, and outperform humans.

• P(Correct) = 65.5%

Page 33: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Assumptions

• Multivariate normality• Equality of variance-covariance matrices

across groups

Page 34: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

ANOVA on D• Click Analyze, Compare Means, One-Way

ANOVA.• Put Verdict in the “Factor Box,” the

Discriminant scores in the “Dependent” list.

Click OK.

Page 35: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

• SSBetween SSWithin = 169.753 143 = 1.187 = the eigenvalue.

• SSBetween SSTotal = 169.753 312.753 = .543 = eta-squared = SQRT(Can. Corr) = SQRT(.737) = .543 = 1 = 1 .457 = .543.

Page 36: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Correlate D With Groups• Analyze, Correlate, Bivariate.

• Click OK. r = .737 = Canonical Corr.

Page 37: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

SAS

• Download Harass90.dat and DFA2.sas.• Edit the program to point to the data file

and run the program.• The output is essentially the same as that

from SPSS, but arranged differently.• “Likelihood Ratio” is Wilks Lambda.

Page 38: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

• For loadings and coefficients, use the “Pooled Within” tables.

• Classification Results for Calibration Data – here are the posterior probabilities for misclassifications.

Page 39: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

Multiple Regression to Predict Verdict

• Look at the Proc Reg statement.• This is a simple multiple regression to

predict verdict from the ratings variables.• The R-square = eta-squared from the DFA• SSmodel SSerror = the eigenvalue from the

DFA.• SSerror SStotal = .

Page 40: Two-Group Discriminant Function Analysis. Overview You wish to predict group membership. There are only two groups. Your predictor variables are continuous

• The parameter estimates (unstandardized slopes) are perfectly correlated with the DFA coefficients.

• Multiply any of the multiple regression parameter estimates by 4.19395 and you get the DFA unstandardized coefficient.