MCA OF THE TASTE EXAMPLE USING SPAD (VERSION 7.4)

Size: px
Start display at page:

Download "MCA OF THE TASTE EXAMPLE USING SPAD (VERSION 7.4)"

Transcription

1 MCA OF THE TASTE EXAMPLE USING SPAD (VERSION 7.4) BRIGITTE LE ROUX 1 AND PHILIPPE BONNET 2 UNIVERSITÉ PARIS DESCARTES 1 INTRODUCTION GETTING STARTED Opening the archived project TasteMCA_en Creating a new project and importing the data base MCA of the Taste Example Setting the parameters Results of MCA Elementary Statistical Results Eigenvalues and modified rates Principal coordinates and contributions Graphs of the cloud of categories and of the cloud of individuals Interpretation of axes using contributions Graphs for Interpreting Axes Clouds of categories Cloud of individuals APPENDIX Generalities of the graph editor The toolbar of the graph editor The fundamental rules for formating a graph Storing principal coordinates Brigitte.LeRoux@mi.parisdescartes.fr Philippe.Bonnet@parisdescartes.fr

2 1 INTRODUCTION This guide aims to help you to perform with SPAD software the analyses presented in the monograph MULTIPLE CORRESPONDENCE ANALYSIS by Brigitte Le ROUX and Henry ROUANET Series: Quantitative Applications in the Social Sciences, n 163 SAGE, CA: Thousand Oaks (2010) Numbers of pages, Figures or Tables refer to this book, that we call hereafter MCA-SAGE. 2 GETTING STARTED You must have at your disposal the 7.4 version of SPAD 3 or the last release of the 7.0 version, that is Opening the archived project TasteMCA_en Download the archived project: TasteMCA_en.spad 4. Open SPAD. Click on the radio button Open archived project, then on OK B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 2/27

3 Then specify the path of the SPAD project. Click on the search button Click on Open Click on OK B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 3/27

4 Click on Yes to open the project. i Here is the main diagram of our study. For all methods the parameters have been set and the running has been done. If you want to perform this kind of analysis on another dataset, look at the parameters of methods by double-clicking on the method icon and do the dame for your dataset. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 4/27

5 If you want to see the results of a method, right-click on the icon of the method. See below the example for 1 - MCA. Several types of results are available. Results editor: results as condensed text; Excel ouput: all results are returned in the Excel environment (Excel must be installed on your computer). The other outputs are graphs: for MCA, clouds of points in principal planes. 2.2 Creating a new project and importing the data base Open SPAD, choose Create a new project and give a name to your project, for instance My_tasteExample. Click on OK. Choose the type of file to be imported (here an Excel file) and double-click. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 5/27

6 Then the icon Excel datasheet appears in the Diagram window. Set the parameters of the method by double-clicking on the method Import Excel datasheet, the following window appears. Open the Excel file Taste_Example.xls and choose the Excel datasheet Click on Metadata to see the data set in the following window. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 6/27

7 The role of each variable has been automatically defined. However, in this example, ID must not be a categorical variable but an identifier. To turn it into an Identifier, right-click on the line ID then choose Role>Identifier as follows. Then you obtain the following results (ID is now an Identifier). Click on OK to import the data. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 7/27

8 Remark. If you don t change the role of ID, the following message appears in the Executions Window. If you click on the log icon, you obtain a message indicating that the number of categories exceeds the maximum. Change the role of the variable (here categorical identifier). B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 8/27

9 3 MCA of the Taste Example In the window Methods, click on MCA Multiple Correspondence Analysis then drag and drop the method icon on the diagram of data import. 3.1 Setting the parameters Double-click on the icon of the MCA method. The window of parameters for MCA has 4 tabs to choose from Variables, Cases, Weighting, Parameters. 1. Click on Variables in order to select the active questions (variables) and the supplementary questions (variables). a) select the active questions (rolling menu: Variable selection: choose Active categorical variables): and transfer the four variables (Tv, Film, Art, Eat) by using the button with one arrow ; b) do the same for the supplementary questions (Supplementary categorical variables). B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 9/27

10 2. Click on Cases to choose active/supplementary individuals (cases); then click on Logical filter and choose Isup=1 and validate. 3. Click on Weighting and clik on the radio button Uniform. 4. Click on Parameters In GDA methodology, there is no assignment of rare modalities: one then performs specific MCA By default, the coordinates of the individuals are not included in the output. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 10/27

11 Running MCA: Right-click on the icon of the method and choose Execute 3.2 Results of MCA Elementary Statistical Results Right-click on the MCA icon and choose Results>Results editor. You obtain the following results. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 11/27

12 Hereafter are the absolute frequencies of the active categories (see MCA-SAGE, Table 3.3, page 45). Verify the frequencies and the choice of active and supplementary questions and active individuals in the text file. The absolute frequencies of categories can also be found in the Excel 5 sheet Cormu-1. Eigenvalues and modified rates In Cormu-4 there are the variances of axes (eigenvalues) (see MCA-SAGE, Table 3.4, page 46). To calculate the modified rates, make the following calculations: 1) Modified values (column E) for the eigenvalues inferior to the average eigenvalue (that is 1/Q, where Q is the number of active variables, in this case: 1/4= 0.25), 5 The results in the Excel document are the following: Cormu-1: marginal distributions of active variables Cormu-4: eigenvalues Cormu-5: coordinates [loadings] of active categories Cormu-6: contributions of active categories Cormu-7: squared cosines of active categories Cormu-8: coordinates [loadings] of active and supplementary [illsutrative] categories Cormu-9: test-values of active and supplementary categories B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 12/27

13 2) Modified rates (modified values divided by the sum of all modified values specified in column E). E4=( (4/3)*(B4-1/4) )^2 F4=E4/$E$29 G4=SUM($F4$ :F4) Sum of modified eigenvalues greater than 1/Q=1/4=0.25. E29=SUM(E4:E15) (cell $E$29) Modified eigenvalues and modified variance rates also appeared in the text file (see below). B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 13/27

14 To interpret the axes we essentially use the sheets Cormu-4 and Cormu-6 and then construct graphs of modalities for the interpretation of axes. Principal coordinates and contributions Coordinates of active categories are in Cormu-5, their contributions are in Cormu-6 (see MCA-SAGE, Table 3.5, page 48) and their qualities of representation in Cormu-7. The coordinates of supplementary categories are in Cormu-8. Graphs of the cloud of categories and of the cloud of individuals Producing graphs with SPAD is very easy and user-friendly. All the graphs of chapters 1 and 3 of the MCA-SAGE book are pre-recorded. To enter the graph editor, right-click on the icon of the MCA method and proceed as follows. Then do Graph>Open>Record as shown below. You obtain the following list of pre-registred graphs, that refer to the Figures of the MCA-SAGE book. You can see the Figure 1.2 of page 7 with different colors of categories according the question. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 14/27

15 The figure below is the colored version of Figure 1.2 on page 7 of the MCA-SAGE book. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 15/27

16 The figure below is the colored version of Figure 1.3 on page 8 of the MCA-SAGE book B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 16/27

17 Interpretation of axes using contributions The interpretation of axes is based upon the contributions of categories (given in sheet cormu-6) (see MCA-SAGE, p. 52). For each axis, mark the categories with an above average contribution, that is, 100/29=3.4%. In the following table, the most contributing categories are highlighted (see MCA-SAGE, Table 3.5, page 48). Contributions of active categories Label Relative Weight (%) Squared distance to origin CORMU-6 Axis 1 Axis 2 Axis 3 TV Tv-News Tv-Comedy Tv-Police Tv-Nature Tv-Sport Tv-Films Tv-Drama Tv-Soap TOTAL Film Action Comedy CostumeDrama Documentary Horror Musical Romance SciFi TOTAL Art PerformanceArt Landscape RenaissanceArt StillLife Portrait ModernArt Impressionism TOTAL Eat Fish&Chips Pub IndianRest ItalianRest FrenchRest SteakHouse TOTAL B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 17/27

18 Graphs for Interpreting Axes Clouds of categories Enter the graph editor and choose the preferences 1. Define Preferences>Style for the page Check the following options. In GDA, figures are geometric maps: the distance scale must be the same in all directions Then click on OK to save your preferences. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 18/27

19 2. Define the Preferences for the active categories (Style for the groups). Select one color and one symbol for active categories (for example a red filled circle), and choose for: size of symbols the option proportional to weights and for lables the option long, as indicated below. Choose the minimum and the maximum size for the symbols : Drawing>Adjust the proportionality Minimum size is 1 Maximum size is 8 B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 19/27

20 Construction of graph for interpreting an axis Select Graph>New, which gives you the following window: 1. Select the active questions by marking active categorical variables, then OK. 2. If preferred, redraw the graph symmetrically to the horizontal axis by using.or/and symetrically to the vertical axis by using 3. In order not to show more than the 14 of the 29 (49%) categories that contribute the most to axis 1: a. Select all points (Selection>Of all points) (the selected points become pink) B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 20/27

21 Then Selection>Statistical filtering of the selection. Choose the options Contribution to one axis, here axis 1, and give the percentage of points to be drawn (49%) as shown below. b. Show the labels by clicking on the button ; c. Unselect the points by using the icon. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 21/27

22 After working on the location of the labels, one obtains a graph like the following: Now you can improve the graph using the powerful possibilities of the graph editor (see the help by clicking on? in the graph window). To interpret axis 2, perform the same steps as for axis 1. For axis 2, use the contributions to axis 2 as the statistical criterion for selecting the modalities, and do the same for axis 3. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 22/27

23 Cloud of individuals To obtain the cloud of individuals with points proportional to superposition: 1. Set the parameters of proportionality: Drawing/Adjust the proportionality and choose Maximal size of the symbols in pixels (for example 8). 2. Select all the points (Selection/Off all points), and go to the menu Format/Colors, symbols, and check the item Proportional size: Superposition. 3. and click on (total unselection) 4. Adjust the proportionality of symbols Drawing>Adjust the propotionality; choose the minimum (2) and the maximum (8). One obtains, in the plane of axes 1-2, the following graph 6 : 6 If you wish to redraw the graph symmetrically to the horizontal axis or/and to the vertical axis, use then B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 23/27

24 Concentration ellipses for Gender. Do the following operations 1. Format> Of cases by 2. Select the variable Gender which will function as structuring factor, by clicking on variable selection And check ellipses in the following window. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 24/27

25 and so on B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 25/27

26 4 APPENDIX 4.1 Generalities of the graph editor The toolbar of the graph editor Select axes Remove labels Display labels Symmetries Symbol size proportional to criterion Point by point selection Selection by framing Total deselection Display as ghosts Back to normal Information on points Refresh The initial pre-selection for a new graph is important: It is necessary to pre-select the variables and the individuals you think you will be interested in analyzing in the graph. The fundamental rules for formating a graph Selection then Format (action) then Unselection Start with selecting a point or a group of points, then format them, and finally do a total unselection. The Selection menu permits to select points, either by groups of points, or point by point. The selection can be done either by using the Selection menu or by the buttons on the toolbar. The Format menu (or the buttons on the toolbar) permits to format the selected points. Because certain operations, for example the replacement of labels, are resource demanding, the graph can be imperfect with double labels or blank spots. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 26/27

27 It is thus advisable to Refresh the graph by hiting the space bar. You can do that also either click on the icon on the toolbar or use the menu: Drawing>Refresh. 4.2 Storing principal coordinates To recover the coordinates [factor loadings] of individuals (or the classes of partitions) in a SPAD Database, drag and drop the method Deployment Archiving>Archiving>Factor loadings and partitions on the MCA icon. Then set the parameters, that is, put the 3 axes in the bottom window. Finally click on OK to run the method. B. Le Roux, P. Bonnet : guide for MCA using SPAD (February 2010) 27/27