# Multiple Correspondence Analysis of Emergencies Attended by Integrated Security Services
## 3 MCA Statistical Characterization
### Matrix Fundamentals of MCA  
Let us consider the number of FRIs as \(k_{n}\) categorical variables, so that each of them has \(J_{k_{n}}\) categories, with \(J_{k_{1}}+J_{k_{2}}+\ldots+J_{k_{N}}=J\). There are \(I\) emergencies registered in the DB, and the \(I\times J\) indicator matrix is denoted by \(\mathbf{X}\). By applying CA on \(\mathbf{X}\) we obtain two sets of factor scores, one for the rows and another for the columns. The total obtained from the table is noted as \(M\), which is the sum of both the rows and the columns of the \(\mathbf{X}\) matrix. To obtain the probability matrix \(\mathbf{Z}\), we use \(\mathbf{Z}=M^{-1}\mathbf{X}\). On the other hand, \(\mathbf{r}\) is the vector of the row totals of \(\mathbf{Z}\) and \(\mathbf{c}\) is the vector of the column totals, and \(\mathbf{D_{c}}\left(\mathbf{D_{r}}\right)\) is the diagonal matrix of \(\mathbf{c}\left(\mathbf{r}\right)\). The factor scores are obtained with the following singular value decomposition:  
\[\mathbf{D_{r}}^{-\frac{1}{2}}(\mathbf{Z}-\mathbf{r}\mathbf{c}^{T})\mathbf{D_{c}}^{-\frac{1}{2}}= \mathbf{P\Delta Q}^{T} \tag{1}\]  
where \(\mathbf{\Delta}\) is the diagonal matrix of the singular values, and \(\mathbf{\Lambda}=\mathbf{\Delta}^{2}\) is the matrix of the eigenvalues. The row and column factor scores are obtained with the relations,  
\[\mathbf{F} =\mathbf{D_{r}}^{-\frac{1}{2}}\mathbf{P\Delta} \tag{2}\] \[\mathbf{G} =\mathbf{D_{c}}^{-\frac{1}{2}}\mathbf{Q\Delta} \tag{3}\]  
The squared distance (\(X^{2}\)) from the rows and columns to their respective barycenter are obtained with the equations  
\[\mathbf{d_{r}} =diag\{\mathbf{F}\mathbf{F}^{T}\} \tag{4}\] \[\mathbf{d_{c}} =diag\{\mathbf{G}\mathbf{G}^{T}\} \tag{5}\]and squared cosine between row \(i\) and factor \(l\) and between column \(j\) and factor \(l\) are obtained as:  
\[O_{i,l} =\frac{\mathbf{f}_{i,l}^{2}}{\mathbf{d}_{r,i}^{2}} \tag{6}\] \[O_{j,l} =\frac{\mathbf{g}_{j,l}^{2}}{\mathbf{d}_{c,j}^{2}} \tag{7}\]  
where \(\mathbf{d}_{r,i}^{2}\) and \(\mathbf{d}_{c,j}^{2}\) are the \(i\)-th element of \(\mathbf{d_{r}}\) and the \(j\)-th element of \(\mathbf{d_{c}}\), respectively. The squared cosines help locating the factors that are important for a given categorical variable. The contributions of row \(i\) to factor \(l\) and of column \(j\) to factor \(l\) are calculated with  
\[\mathbf{t}_{i,l} =\frac{\mathbf{f}_{i,l}^{2}}{\mathbf{\lambda}_{l}} \tag{8}\] \[\mathbf{t}_{j,l} =\frac{\mathbf{g}_{j,l}^{2}}{\mathbf{\lambda}_{l}} \tag{9}\]  
where \(\mathbf{\lambda}_{l}\) are the eigenvalues obtained form the indicator matrix. These contributions help us to identify the observations or variables that are important for a given factor. By using the transition formula, the supplementary or illustrative elements can be projected onto the factors. Let us consider \(i_{sup}^{T}\) as an illustrative row and \(j_{sup}^{T}\) as an illustrative column to be projected. Their coordinates \(f_{sup}\) and \(g_{sup}\) are obtained as  
\[f_{sup} =(i_{sup}^{T}1)i_{sup}^{T}\mathbf{G}\mathbf{\Delta}^{-1} \tag{10}\] \[\mathbf{F} =\mathbf{D_{r}}^{-\frac{1}{2}}\mathbf{P\Delta} \tag{2}\]0  
By applying CA to the indicator matrix, the factor scores are provided for the rows and the columns. However, these factor scores need to be re-scaled for MCA. The \(J\times J\) table given by \(\mathbf{B}=\mathbf{X}^{T}\mathbf{X}\) is the so-called _Burt Matrix_ associated to \(\mathbf{X}\). This table is relevant in MCA because using CA on the Burt matrix gives the same factors as the analysis of \(\mathbf{X}\) but it is often computationally easier to calculate. The Burt matrix also plays an important theoretical role, because the eigenvalues obtained from its analysis give a better approximation of the inertia explained by the factors than the eigenvalues of \(\mathbf{X}\)[14]. When analyzing the MCA results, it is necessary to use different mathematical elements to evaluate them and reach conclusive results. The most frequently used metrics are briefly explained next [16].