40
Data - issues Studying the individuals Studying the categories Interpretation aids Multiple Correspondence Analysis François Husson Applied Mathematics Department - AGROCAMPUS OUEST [email protected] 1 / 38

Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Multiple Correspondence Analysis

François Husson

Applied Mathematics Department - AGROCAMPUS OUEST

[email protected]

1 / 38

Page 2: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Plan

1 Data - issues

2 Studying the individuals

3 Studying the categories

4 Interpretation aids

2 / 38

Page 3: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

The data

21

Categorical variables

I

1

i

j

Individuals

1 J

vij

I individualsJ qualitative variables

vij : category of the j-th variablepossessed by the i-th individual

Example : survey where I peoplereply to J multiple-choice questions

3 / 38

Page 4: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

The data

17

i’ 0 1 0 0 0

Kj = 5

I

1

i

j

Ind

ivid

ua

ls

1 J

i’

I

1

i

j

Ind

ivid

ua

ls

1 J

yik

Indicator Matrix

1 k Kj K Σ

J

IJIpk

I

Categorical variablesCategories

vij

married

4 / 38

Page 5: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Goals

1 Studying the individualsOne individual = one row of the CDT = set of categoriesSimilarity of individuals – Inter-individual variabilityPrincipal axes of the inter-individual variability

(in relation to the categories)2 Studying the variables

Links between qualitative variables(in relation to the categories)

Visualization of the set of associations between categoriesSynthetic variables

(quantitative indicators based on the qualitative variables)

⇒ Similar problem to PCA

5 / 38

Page 6: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Leisure activity data

• Extract from 2003 INSEE survey on identity construction,called the “history of life” survey

• 8403 individuals• 2 sorts of variables :

• Which of the following leisure activities do you practiceregularly : Reading, Listening to music, Cinema, Shows,Exhibitions, Computer, Sport, Walking, Travel, Playing amusical instrument, Collecting, Voluntary work, Homeimprovement, Gardening, Knitting, Cooking, Fishing, Numberof hours of TV per day on average

• supplementary variables (4 questions) : sex, gender, profession,marital status

6 / 38

Page 7: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Leisure activity data

Hobbies Number Sex Female 4616

Listening music 5947 Male 3787

Reading 5646 Age [15,25] 857

Walking 4175 (25,35] 1302

Cooking 3686 (35,45] 1646

Mechanic 3539 (45,55] 1837

Travelling 3363 (55,65] 1257

Cinema 3359 (65,75] 937

Gardening 3356 (75,85] 482

Computer 3158 (85,100] 85

Sport 3095 Marital Divorcee 792

Exhibition 2595 status Married 4333

Show 2425 Remarried 404

Playing music 1460 Single 2140

Knitting 1413 Widower 734

Volunteering 1285 Profession

foreman 735Fishing 945

management 1052Collecting 862

employee 2552

Number of hours watching TV 0 1017

unskilled worker 792

1 1223

manual labourer 1161

2 2156

technician 401

3 1775 other 212

4 2232 No answer 1498

Sociodemographic

variablesHobbies

7 / 38

Page 8: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Leisure activity data

Respondent

1

1

8403

18 1 4

Hobbies Sociodemographic

= yes

or no

MCA 1 : active = leisure activity, then use supplementary data forinterpretation• 1 individual = vector of leisure activities• Principal axes of variability of leisure vectors• Links between these axes and the supplementary variables

MCA 2 : active = supplementary variables, leisure activities assupplementary informationMCA 3 : active = BOTH 8 / 38

Page 9: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Transforming the complete disjunctive table

An individual’s weight is1I

yik = 1 if the i-th individual is in k-th category of the j-th variable(for each pk)

= 0 otherwise

Idea : xik = yik/pk

∑Ii=1 xikI

=1I

∑Ii=1 yikpk

=1I

I × pkpk

= 1

Centering : xik = yik/pk − 1

9 / 38

Page 10: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Plan

1 Data - issues

2 Studying the individuals

3 Studying the categories

4 Interpretation aids

10 / 38

Page 11: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Point cloud of individuals

category k

IN

)',( iid

kix '

KRI

iM

OGI =

'iM(weight = 1/I)

(weight = )Jpk

ikx

1

i

I

k1 K

Ind

ivid

ua

lsCategories

Indicator matrix

ikx

d2i,i ′ =

K∑k=1

pkJ

(xik − xi ′k)2 =

K∑k=1

pkJ

(yikpk− yi ′k

pk

)2

=1J

K∑k=1

1pk

(yik−yi ′k)2

• 2 individuals with same categories : distance = 0

• 2 individuals with many shared categories : small distance

• 2 individuals, only 1 with a rare category : large distance to indicate this

• 2 individuals share rare category : small distance to indicate this sharedspecificity

d(i ,GI )2 =

K∑k=1

pkJ(xik)

2 =K∑

k=1

pkJ

(yikpk− 1)2

=1J

K∑k=1

yijpk− 1

Inertia(NI ) =I∑

i=1

1Id2(i ,O)︸ ︷︷ ︸

inertia of i

=I∑

i=1

(1IJ

K∑k=1

yikpk− 1

I

)=

K

J− 1

11 / 38

Page 12: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Point cloud of individuals

category k

IN

)',( iid

kix '

KRI

iM

OGI =

'iM(weight = 1/I)

(weight = )Jpk

ikx

1

i

I

k1 K

Ind

ivid

ua

lsCategories

Indicator matrix

ikx

d2i,i ′ =

K∑k=1

pkJ

(xik − xi ′k)2 =

K∑k=1

pkJ

(yikpk− yi ′k

pk

)2

=1J

K∑k=1

1pk

(yik−yi ′k)2

d(i ,GI )2 =

K∑k=1

pkJ(xik)

2 =K∑

k=1

pkJ

(yikpk− 1)2

=1J

K∑k=1

yijpk− 1

Inertia(NI ) =I∑

i=1

1Id2(i ,O)︸ ︷︷ ︸

inertia of i

=I∑

i=1

(1IJ

K∑k=1

yikpk− 1

I

)=

K

J− 1

11 / 38

Page 13: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Building the point cloud of individuals

Getting factor axes, as usual, like for all factor analysis methods

Sequential construction : look for the axis maximizing the inertiaand orthogonal to previous axes

12 / 38

Page 14: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Leisure activity data

• Extract from 2003 INSEE survey on identity construction,called the “history of life” survey

• 8403 individuals• 2 sorts of variables :

• Which of the following leisure activities do you practiceregularly : Reading, Listening to music, Cinema, Shows,Exhibitions, Computer, Sport, Walking, Travel, Playing amusical instrument, Collecting, Voluntary work, Homeimprovement, Gardening, Knitting, Cooking, Fishing, Numberof hours of TV per day on average

• supplementary variables (4 questions) : sex, gender, profession,marital status

13 / 38

Page 15: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Diagram showing the inertia

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Eigenvalues

Dimension

Eig

enva

lues

0.00

0.05

0.10

0.15

14 / 38

Page 16: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Representation of the point cloud of individuals

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

15 / 38

Page 17: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Representation of the point cloud of individuals

What kind of pattern might we see ?

The Guttman effect

16 / 38

Page 18: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Individuals shown in terms of the gardening variable

Idea : use the catego-ries and variables tointerpret the plot of theindividuals

Put a category atthe barycenter of theindividuals in it

−1.0 −0.5 0.0 0.5 1.0

−1.

0−

0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (

6.91

%)

Gardening_0Gardening_1

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

● ●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

●●

● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●

● ●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●● ●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

● ●

● ●

● ●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●●

● ●

●●

●●

● ●

● ●

●●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

● ●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

● ●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

17 / 38

Page 19: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Showing the categories with the point cloud of individualsEach category is at the barycenter of the individuals in it

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

Reading

ReadingListening music

Listening music

Cinema

Cinema

Show ShowExhibition Exhibition

Computer

Computer

Sport

SportWalking

Walking

Travelling TravellingPlaying music

Playing musicCollecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

01

23

4

Activity not performed – activity performed18 / 38

Page 20: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Showing the categories with the point cloud of individuals

-0.4 -0.2 0.0 0.2 0.4

-0.2

0.0

0.2

Dim 1 (16.95%)

Dim

2 (

6.91

%)

Reading

Reading

Listening music

Listening music

Cinema

Cinema

Show

Show

Exhibition ExhibitionComputer

Computer

Sport

SportWalking

Walking

TravellingTravelling

Playing music

Playing musicCollecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

0

1

2

3

4

Activity not performed – activity performed

19 / 38

Page 21: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Showing the categories with the point cloud of individuals

Listen PlayRead music Cinema Show Exhib Comput Sport Walk Travel music Collec Volunteering Mechanic Garden Knitt Cook Fish TV

5938 y y n y y y y y y y y y y y y y n 32432 y y y y y y n y y y y y y y y y n 28325 n n n n n n n n n n n n n n n n n 4203 n n n n n n n n n n n n n n n n n 4

-1.0 -0.5 0.0 0.5 1.0 1.5

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

5938

8325

2432

203

-0.4 -0.2 0.0 0.2 0.4

-0.2

0.0

0.2

Dim 1 (16.95%)

Dim

2 (

6.91

%)

Reading

Reading

Listening music

Listening music

Cinema

Cinema

Show

Show

Exhibition ExhibitionComputer

Computer

Sport

SportWalking

WalkingTravelling

TravellingPlaying music

Playing musicCollecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

0

1

23

4

20 / 38

Page 22: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Showing the categories with the point cloud of individuals

Listen PlayRead music Cinema Show Exhib Comput Sport Walk Travel music Collec Volunteering Mechanic Garden Knitt Cook Fish TV

255 y y y y y y y y y y n y n n n n n 1 6766 y y y y y y y y y y n n n n n y n 0 5676 n n n n n n n n n n n n y y y y n 41143 y n n n n n n n n n n n y y y n n 4

-1.0 -0.5 0.0 0.5 1.0 1.5

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

255

5676

6766

1143

-0.4 -0.2 0.0 0.2 0.4

-0.2

0.0

0.2

Dim 1 (16.95%)

Dim

2 (

6.91

%)

Reading

Reading

Listening music

Listening music

Cinema

Cinema

Show

Show

Exhibition ExhibitionComputer

Computer

Sport

SportWalking

WalkingTravelling

TravellingPlaying music

Playing musicCollecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

0

1

23

4

21 / 38

Page 23: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Showing the variables to help interpret the axes

Idea : look at coordinatesof projected individuals oneach axis, and calculate avalue for the connectionbetween these coordinatesand each qualitativevariable

Correlation ratio betweenthe j-th variable and s-thcomponent : η(v.j ,Fs)

η2(F2,Gardening) = 0.453

η2(F1,Gardening) = 0.047

−1.0 −0.5 0.0 0.5 1.0

−1.

0−

0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (

6.91

%)

Gardening_nGardening_y

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

● ●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

●●

●●

● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●

● ●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●● ●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

● ●

● ●

● ●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●●

● ●

●●

●●

● ●

● ●

●●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

● ●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

● ●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

22 / 38

Page 24: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Showing the variables to help interpret the axes

Using the squared corre-lation ratios

The s-th axis is or-thogonal to the t-th forall t < s, and the mostrelated to the qualitativevariables in the η2 sense :

Fs = maxF

J∑j=1

η2(F , v.j)

0.0 0.1 0.2 0.3 0.4 0.5

0.0

0.1

0.2

0.3

0.4

0.5

Dim 1 (16.95%)

Dim

2 (

6.91

%)

ReadingListening music

Cinema

ShowExhibition

ComputerSportWalking

TravellingPlaying music

CollectingVolunteering

Mechanic

Gardening

Knitting

Cooking

Fishing

TV

23 / 38

Page 25: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Plan

1 Data - issues

2 Studying the individuals

3 Studying the categories

4 Interpretation aids

24 / 38

Page 26: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Point cloud of categories

Individual i

weight = 1/I

1

i

I

k1 KIndividuals

Categories

I )',( kkd

ikx'ikxikxGJ

Jpkweight =KN

RI

kM'kM

Var(k) = d2(k,O) =I∑

i=1

1Ix2ik =

I∑i=1

(yikpk− 1)2

=1pk− 1

pk 1/2 1/5 1/10 1/101d(k,O) 1 2 3 10

(si J = 10) Inertia(k) 0.05 0.08 0.09 0.099

Inertia(k) =pkJd2(k ,O) =

1− pkJ

d2(k, k ′) =I∑

i=1

(yikpk− yik′

pk′

)2

=pk + pk′ − 2pkk′

pkpk′

25 / 38

Page 27: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Inertia of categories or variables

Inertia(k) =1− pk

J

Inertia(j) =1J

Kj∑k=1

(1− pk) =Kj − 1

J

Variable No. of categories Inertia No. dim. of subspacesex 2 1/J 1region 21 20/J 20district 96 95/J 95

BUT : the inertia Kj−1J is spread across a Kj − 1 dim. subspace

Total inertia =J∑

j=1

Kj − 1J

=K

J− 1

26 / 38

Page 28: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Representing the point cloud of categoriesSequential search for axes – as usual in factor analysis : each axis must maximize theinertia and be orthogonal to all previous ones

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

Reading

Reading

Listening music

Listening music

Cinema

Cinema

Show

Show

ExhibitionExhibition

Computer

Sport

Walking

Travelling TravellingPlaying music

Collecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

0

1

2

3

4

ComputerWalking

Sport

Playing music

Activity not performed – activity performed27 / 38

Page 29: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Projections of the individualsEach individual put at barycenter of the categories they possess

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

Reading

Reading

Listening music

Listening music

Cinema

Cinema

Show

Show

ExhibitionExhibition

Computer

Computer

Sport

Walking

Walking

Travelling TravellingPlaying music

Collecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

0

1

2

3

4

Sport

Playing music

28 / 38

Page 30: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Barycentric representation – simultaneous representationOptimal representation of individualsCategories at the barycenter :

Gs(k) =

1√λs

I∑i=1

yikIk

Fs(i)

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

Reading

ReadingListening music

Listening music

Cinema

Cinema

Show ShowExhibition Exhibition

Computer

Computer

Sport

SportWalking

Walking

Travelling TravellingPlaying music

Playing musicCollecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

01

23

4

Optimal representation of categoriesIndividuals at the barycenter :

Fs(i) =

1√λs

J∑j=1

yikJGs(k)

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)Reading

Reading

Listening music

Listening music

Cinema

Cinema

Show

Show

ExhibitionExhibition

Computer

Computer

Sport

Walking

Walking

Travelling TravellingPlaying music

Collecting

Collecting

Volunteering

Volunteering

Mechanic

Mechanic

Gardening

Gardening

Knitting

Knitting

Cooking

Cooking

Fishing

Fishing

0

1

2

3

4

Sport

Playing music

29 / 38

Page 31: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Barycentric representation – simultaneous representationOptimal representation of individualsCategories at the pseudo-barycenter :

Gs(k) =1√λs

I∑i=1

yikIk

Fs(i)

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)

Reading_n

Reading_y

Listening music_n

Listening music_y

Cinema_n

Cinema_y

Show_n

Show_y

Exhibition_nExhibition_y

Computer_n

Computer_y

Sport_n

Sport_yWalking_n

Walking_y

Travelling_n Travelling_yPlaying music_n

Playing music_y

Collecting_n

Collecting_y

Volunteering_n

Volunteering_y

Mechanic_n

Mechanic_y

Gardening_n

Gardening_y

Knitting_n

Knitting_y

Cooking_n

Cooking_y

Fishing_n

Fishing_y

0

1

2

3

4

Optimal representation of categoriesIndividuals at the pseudo-barycenter :

Fs(i) =1√λs

J∑j=1

yikJGs(k)

-1.0 -0.5 0.0 0.5 1.0

-1.0

-0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (6

.91%

)Reading_n

Reading_y

Listening music_n

Listening music_y

Cinema_n

Cinema_y

Show_n

Show_y

Exhibition_nExhibition_y

Computer_n

Computer_y

Sport_n

Sport_yWalking_n

Walking_y

Travelling_n Travelling_yPlaying music_n

Playing music_y

Collecting_n

Collecting_y

Volunteering_n

Volunteering_y

Mechanic_n

Mechanic_y

Gardening_n

Gardening_y

Knitting_n

Knitting_y

Cooking_n

Cooking_y

Fishing_n

Fishing_y

0

1

2

3

4

29 / 38

Page 32: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Plan

1 Data - issues

2 Studying the individuals

3 Studying the categories

4 Interpretation aids

30 / 38

Page 33: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Inertia and percentage of inertia in MCA

λs =1J

J∑j=1

η2(Fs , v.j)

⇒ λs is the mean of the squared correlation ratios

• Individuals live in RK−J ⇒ low percentages of inertia• Maximal percentage for given axis s :

λs∑K−Jt=1 λt

× 100 ≤1

K−JJ

× 100

≤J

K − J× 100

With K = 100, J = 10 : λs ≤ 11.1 %

• Mean of non-zero eigenvalues : 1K−J

×∑

t λt =1

K−J×(

KJ− 1)= 1

J

⇒ interpret the axes of inertia above 1/J

31 / 38

Page 34: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Contributions and quality of representation

• Contributions and cos2 for individuals and categories

⇒ distant categories don’t necessarily contribute a lot(depends on their frequency)⇒ small cos2 as expected – many dimensions

• Absolute contribution of a variable :

CTR(j) =

Kj∑k=1

CTR(k) =η2(Fs , v.j)

J

• Relative contribution : CTR(j) = η2(Fs ,v.j )Jλs

32 / 38

Page 35: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Representing supplementary elements

Use transition formulas to represent supplementary elements(individuals, variables, etc.)

-1.0 -0.5 0.0 0.5

-1.0

-0.5

0.0

0.5

Dim 1 (16.95%)

Dim

2 (

6.91

%)

F

M

(25,35]

(35,45]

(45,55]

(55,65]

(65,75]

(75,85]

(85,100]

[15,25]

Divorcee

Remarried

Single

Widower

Employee Foreman

Management

Manual labourer

Profession.NA

Unskilled worker

Married

Other

Technician

33 / 38

Page 36: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Quantitative supplementary variables⇒ What can we do with quantitative variables ?

• Supplementary information : project onto the axes, calculatecorrelation coefficients with each axis

• break up quantitative variable into categories/classes

−1.5 −1.0 −0.5 0.0 0.5 1.0 1.5

−1.

0−

0.5

0.0

0.5

1.0

Dim 1 (16.95%)

Dim

2 (

6.91

%)

nb.activitees

34 / 38

Page 37: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Describing the axesUsing qualitative variables (Fisher test), using categories (Studenttest), using quantitative variables (correlations)Quantitative variables

correlation p.valuenb.activitees 0.9753459 0

Categorical variables CategoriesR2 p.value Estimate p.value

Reading 0.239 0.00e+00 Playing music_Y 0.268 0Listening music 0.275 0.00e+00 Travelling_Y 0.270 0Cinema 0.389 0.00e+00 Walking_Y 0.184 0Show 0.383 0.00e+00 Sport_Y 0.247 0Exhibition 0.399 0.00e+00 Computer_Y 0.263 0Computer 0.327 0.00e+00 Exhibition_Y 0.304 0Sport 0.287 0.00e+00 Show_Y 0.304 0Walking 0.172 0.00e+00 Sport_N -0.247 0Travelling 0.355 0.00e+00 Computer_N -0.263 0Playing music 0.209 0.00e+00 Exhibition_N -0.304 0Mechanic 0.135 8.82e-267 Show_N -0.304 0Cooking 0.125 9.42e-247 Cinema_N -0.283 0Profession 0.128 7.20e-245 Listening music_N -0.257 0Volunteering 0.109 2.25e-212 Reading_N -0.231 0

35 / 38

Page 38: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Different MCA strategy : Burt table

Burt table :• Pairwise links between variables (like a

correlation matrix between quantitativevariables)

• Correspondence analysis on Burt table• Gives results uniquely for categories :

same representation but differenteigenvalues : λBurts =

(λTDCs

)2• λTDC

s mean of squared correlation ratios

variable l variable j

varia

ble

jva

riabl

e l

⇒ The MCA only depends on pairwise links between variables (justlike PCA only depends on the correlation matrix)

36 / 38

Page 39: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Conclusion

• MCA is the best factor analysis method for tables ofindividuals with qualitative variables

• Eigenvalues represent the means of squared correlation ratios• The values of these squared links are particularly importantwhen there are lots of variables

• Return to the data by analyzing the contingency table with CA• Convergence of CDT analysis and Burt table analysis is astrong argument in favor of the general method

• MCA can be use to pre-treat data before doing classification

37 / 38

Page 40: Multiple Correspondence Analysis · Data - issuesStudying the individualsStudying the categoriesInterpretation aids Thedata I individuals J qualitativevariables v ij: category of

Data - issues Studying the individuals Studying the categories Interpretation aids

Extras

K31116

François Husson • Sébastien LêJérôme Pagès

Husson Lê

Pagès

Statistics

Exploratory Multivariate Analysis by Example Using R

S E C O N D E D I T I O N

Exploratory Multivariate Analysis by Exam

ple Using R

Chapman & Hall/CRC Computer Science & Data Analysis SeriesChapman & Hall/CRC Computer Science & Data Analysis Series

Second Edition

ISBN: 978-1-138-19634-6

9 781 138 196346

90000

Husson F., Lê S. & Pagès J. (2017)Exploratory Multivariate Analysis by ExampleUsing R2nd edition, 230 p., CRC/Press.

The FactoMineR package for running MCA :http://factominer.free.fr

Videos on Youtube :• Youtube channel : youtube.com/HussonFrancois• video playlist in English• video playlist in French

38 / 38