Full text
1 Tests for identifying the unchanging reference component of compositional data using the properties of the coefficient of variation T. OHTA1, H. ARAI2 and A. NODA3 1Department of Earth Sciences, Faculty of Education and Integrated Arts and Sciences, Waseda University, Japan, [email protected] 2Advanced Research Center for Science and Engineering, Waseda University, Japan 3Geological Survey of Japan, National institute of Advanced Industrial Sciences and Technology, Japan Abstract In analyses of compositional data, it is important to select a suitable unchanging component as a reference to detect the behavior of a single variable in isolation. This paper introduces two tests for detecting the unchanging component, based on a new approach that utilizes the coefficient of variation of component ratios. That is, the coefficient of variation of a compositional ratio is subject to change when the unchanging component is switched between the denominator and numerator, and the coefficient of variation tends to be small when the unchanging component occurs as the denominator against any arbitrary components (Test 1). In addition, the ratio of the component pair that gives the lowest coefficient of variation is most likely to represent the two unchanging components (Test 2). However, Tests 1 and 2 are not necessary and sufficient conditions for uniquely finding the unchanging component. To verify the effectiveness of the tests, 500 artificial data sets were analyzed and the results suggest that the tests are able to identify the unchanging component, although Test 1 underperforms when the data set includes a component with skewness greater than 0.5, and Test 2 fails when the data set includes components with a correlation coefficient greater than 0.75. These defects can be overcome by interpreting the two test results in a complementary manner. The proposed tests provide powerful yet simple criteria for identifying the unchanging component in compositional data; however, the reliability of this approach needs to be assessed in further studies. Keywords: Compositional data, closed data, unchanging component, reference frame, coefficient of variation Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 1
2 1. Introduction In the field of geosciences, scientists seek to compare compositional data to identify differences between data sets or to detect a trend within the data. An innovative approach proposed by Aitchison (1986) and many successive works made this difficult task possible by mapping the simplex sample space to the Euclidean sample space (logratio analysis) or by building a proper algebra and distance function within the simplex (stay-in-the-simplex method). The basic problem encountered in analyzing compositional data is that they only retain relative information, which is best extracted using Aitchison’s (1986) method. However, in some cases, geoscientists need to determine the behavior of a single variable in isolation; e.g., detecting gains or losses of a single element during geological processes such as magmatism, metamorphism or alteration. Four methods have been proposed for this purpose: (1) mass-balance calculations (Brimhall and Dietrich, 1987; Brimhall et al., 1988), (2) the isocon method (Grant, 1986), (3) the logratio f-value method (Woronow and Love, 1990) and (4) Pearce element ratios (Pearce, 1968). For example, the mass-balance approach combines the chemical and physical properties of the host rock and weathered derivatives to determine the enrichment or depletion of a single element during weathering. The basic mass conservation of any element during weathering can be stated based on the volumes, densities, compositions of the host rock and weathered material as well as the mass flux between them (e.g., eq. 1 of Brimhall and Dietrich, 1987). The compositions and densities can be measured directly, and in the case of an element whose absolute abundance remained unchanged during weathering, the mass flux term can be eliminated. Subsequently, the only remaining unknown quantity, the volumetric change, can be calculated. By importing this quantity to the mass conservation equations of other elements, the absolute mass flux of a given element can be estimated (Brimhall and Dietrich, 1987; Brimhall et al., 1988). The logical operation of the isocon method is similar to this mass-balance approach (see Grant, 1986, 2005). All four of above methods utilize the unchanging component to determine the fractionation of a single variable. However, a problem arises when the unchanging component is not self-evident, which happens to be the case in many practical data sets in geosciences. Woronow and Love (1990) and Schedl (1998) made an advance in determining a truly unchanging reference component by providing robust statistical criteria for the identification of the unchanging component in compositional data. Although these statistical methods are mathematically valid, few studies have employed these methods in practical analyses of geoscientific data. This lack of uptake may reflect the fact that the methods involve a somewhat complicated series of statistical tests and require the existence of two unchanging components within the given compositional data. Subsequent to these studies, there has been little progress. The present study aims to introduce additional criteria for detecting the unchanging component, based on a new approach that utilizes the coefficient of variation. First, we investigate the properties of the coefficient of variation in compositional data. Then, we show that the coefficient of variation of an unchanging component meets two unique conditions that can serve as new criteria in identifying the unchanging component. If this method can be Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 2
3 used to readily identify the unchanging component, it would then be possible to quantify the actual variation of the single component in compositional data. 2. Definitions The nomenclature and symbols used in this paper follow those of Aitchison (1986). Basis is a non-constrained, D–dimensional data vector w=(w 1 ,…,w D ) and w t is the sum of the basis. Composition, x=x1,…,xD ( ) , corresponds to the constrained data vector of w whose sum is 1 or 100. D and n denote the number of variables and the number of cases, respectively. Note that we only give the sub-index for the variables in all data matrix symbols and that we omit using the sub-index for the cases (e.g., wi and x i ), for the sake of simplicity. Therefore, if the summation sign ( ∑ ) is used, it indicates a summation over the cases for which the sub-index is not given. w i , s w i and V wi denote the mean, standard deviation and coefficient of variation of wi , respectively. The standardized k-th moment of wi is expressed as αw i k and the product moment coefficient of wi and w j is expressed as r wi,wj . 3. Prediction of compositional data using the basis Because x is in a constrained form, it is impossible to identify the unchanging component solely from x. Conversely, the unchanging component in w is obvious. Therefore, we will attempt to identify the relationship between the composition and the basis by predicting V x i for any component in compositional data in terms of the statistics of the basis. If this approach is successful, it would be possible to determine the conditions under which x i is the unchanging component. In terms of mathematical background, this study is largely an extension of Pearson’s (1897) theory. However, we also seek to improve the formula proposed by Pearson (1897) because the associated prediction error tends to be large, as discussed below. 3.1 Predicting the mean If the deviation of wi is denoted as εw i =wi−wi , the mean of the composition x i is: xi=1 n xi=1 n wi wt ∑∑ =1 n wi wt εwi wi +1 ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ εwt wt +1 ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ −1 ∑ (1) Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 3
4 We assume that the ratio of the deviation to the mean is small, and using the McLaurin expansion (third-order approximation), we have: xi=1 n wi wt 1+εi wi −εt wt +εt 2 wt 2+εt 3 wt 3−εiεt wiwt +εiεt 2 wiwt 2 ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ∑ We neglect the cubic terms, except for the skewness term, as skewness can be large depending on the distribution. Subsequently, the mean of composition can be expressed in terms of the basis statistics as follow: xi=wi wt 1+Vw t 2+αw t 3Vw t 3−r w i ,w t Vw i Vw t ( ) (2) 3.2. Predicting standard variation Similarly to above, the standard deviation of the composition x i can be denoted by the basis. sx i 2=1 n xi−xi ( ) 2 ∑ =1 n wi 2 wt 2 εw i wi +1 ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ εw t wt +1 ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ −1 −1+Vw t 2−r w i ,w t Vw i Vw t ( ) ⎡ ⎣ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ∑ 2 (3) If the McLaurin expansion of Equation (3) is performed until the fourth-order approximation, and if we neglect the products of more than four quantities (except for the kurtosis term, as kurtosis is always greater than 1.8), we have: sxi 2=1 n wi 2 wt 2 εwi 2 wi 2+ εwt 2 wt 2−2 εwt 3 wt 3+3 εwt 4 wt 4−2 εwi wi εwt wt ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ∑ sx i =wi wt Vw i 2+Vw t 2−2αw t 3Vw t 3+3αw t 4Vw t 4−2r w i ,w t Vw i Vw t ( ) 1 2 (4) 3.3 Predicting the coefficient of variation Above, we obtained two equations predicting the mean and standard deviation of the composition in terms of the basis statistics. By dividing the latter by the former, we finally obtain the formula that addresses the coefficient of variation of the composition: namely, Vx i = Vw i 2+Vw t 2−2αw t 3Vw t 3+3αw t 4Vw t 4−2r w i ,w t Vw i Vw t ( ) 1 2 1+Vw t 2+αw t 3Vw t 3−r w i ,w t Vw i Vw t (5) From this equation, we can see that even if wi is the unchanging component, Vxi is not equal to zero. Moreover, the component that gives the smallest coefficient of variation is not always the unchanging Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 4
5 component. For this reason, the unchanging component cannot be detected directly from the compositional data. To demonstrate the accuracy of Equation (5), we generated 100 sets of data that each contains five normally distributed variables with 100 cases in each. For these 500 variables, the means were fixed to 100 and the standard deviations were randomly selected from a value ranging from 1 to 40, thereby allowing a 40 times of differences in the value of the coefficient of variation. Then, actual V x i , and V x i calculated by Equation (5) were compared against the averaged ratio of deviation to the mean ( εw i w i ) for each variable in Figure 1. Figure 1. Prediction errors for Equations (5) in analyses of random data sets. Although the Equation (5) was derived assuming a small value for the ratio of deviation to the mean, the prediction error does not increase significantly even for the variables with high εw i w i . Therefore, as long as variables do not contain significant outliers, we consider that this equation generally holds. 3.4 Coefficient of variation of ratios If we consider the ratios of compositions, it is clear that xixj=wiwj ; thus, Equation (5) can be rewritten as follows: Vx i /x j = Vw i 2+Vw j 2−2αw j 3Vw j 3+3αw j 4Vw j 4−2rw i ,w j Vw i Vw j ( ) 1 2 1+Vw j 2+αw j 3Vw j 3−rw i ,w j Vw i Vw j (6) Supposing that w j is an unchanging component, then V w j is zero and we have Vx i /x j =Vw i . However, if the denominator and numerator are replaced, then Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 5
6 Vxj/xi=Vwi 2−2αwi 3Vwi 3+3αwi 4Vwi 4 ( ) 1 2 1+Vwi 2+αwi 3Vwi 3 Accordingly, the coefficient of variation of ratios is subject to change when the unchanging component is switched between the denominator and numerator. Figure 2 compares the values of Vx i /x p and Vx p /x i in the case that wp is the unchanging component. The shaded area in Figure 2a shows the value range when the kurtosis of wi is changed from 1.8 to 3.0 (from a uniform to normal distribution), and those in Figure 2b shows the value range when the skewness of wi is changed from 0.99 to –0.99 (from positively to negatively skew-normal distributions). For Figure 2a, the value range suggests that Vx p /x i is always greater than Vx i /x p . This is also true for Figure 2b; however, the opposite relationship can occur when wi is highly positively skewed. Figure 2. Comparison of the coefficients of variation of ratios when the unchanging component is the denominator (horizontal axis) and numerator (vertical axis). xp and x i represent the unchanging component and arbitrary component, respectively. (a) The shaded area represents the value range with changing kurtosis of the counterpart component ( x i ). (b) The shaded area represents the value range with changing skewness of the counterpart component. The above findings suggest that if wp is the unchanging component, then for every component i, Vx i /x p will tend to be smaller than Vx p /x i . This relationship also holds when Vwp <Vwi , indicating that wp need not be a completely unchanging component. Therefore, this proposition can serve as one criterion for finding the unchanging or least-changing component in compositional data (Property 1). However, Property 1 is not a necessary and sufficient condition for finding the unchanging component, as components Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 6
7 that give a highly positively skewed distribution can distort this condition (Fig. 2b). Consequently, additional diagnostic properties are necessary to uniquely define the unchanging component. In the case of two unchanging components in the data (wp = wq = constant), then Vw p =Vw q =0 and Vx p /x q is equal to zero. Accordingly, the component pair that gives the lowest coefficient of variation of the ratio is most likely to represent the two unchanging components (Property 2). However, a problem with Property 2 is that it requires two unchanging components in the data. Another concern is that Vx i /x j can attain small values depending on the combination of V wi , V w j and r wi,wj . In particular, in the case that Vwi =Vwj and rw i ,w j =1 , that means if there are two components behaving similarly, then Vx i /x j decreases to: 3αw j 4Vw j 4−2αw j 3Vw j 3 1+αw j 3Vw j 3 Therefore, like Property 1, Property 2 is not a necessary and sufficient condition for finding the unchanging component. 4. Tests for identifying the unchanging component As noted above, the presence of a component with a highly positively skewed distribution can distort Property 1 but not Property 2. Similarly, the presence of components that behave similarly may distort Property 2 but not Property 1. Consequently, the component that satisfies both Properties 1 and 2 is the most likely candidate for the unchanging component. On this basis, we propose two tests for identifying the unchanging component. Test 1 is based on Property 1. First, compare the coefficients of variation for pair-wise ratios. Then, count the numbers of components for which Vx i /x p <Vx p /x i . If wp is the most invariant component in w, then the count number would logically be D–1, where D is the number of components. Thus, the component with the largest count is the most likely candidate for the unchanging component. Test 2 is based on Property 2. Compare the coefficients of variation for all ratio combinations. Select the four or five lowest coefficients of variation. The component that appears repeatedly in these four or five ratios is the candidate for the unchanging component. Logically, it may be sufficient to consider only the denominator of the ratio that returns the lowest coefficient of variation. However, some leeway is given in this regard because there might be a low probability of two unchanging components being simultaneously present in the same data set and a high probability of two components behaving similarly in the data set. 5. Application of the tests to artificial data sets Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 7
8 Five artificial data sets, each consisting of eight components (100 cases) with the last component being invariant ( w8 ), were generated to verify the effectiveness of Tests 1 and 2. These data sets were designed to represent extreme cases, with the intention of assessing the conditions under which the two tests are successful or unsuccessful in detecting the unchanging component ( x8 in these cases). The components of the first four data sets are designed to represent four different independent distribution classes; normal (Table 1), uniform (Table 2), negatively skew-normal (Table 3) and positively skew-normal distributions (Table 4). For these four data sets, the means of w 1 to w7 were fixed to 100 and the standard deviations were randomly chosen from 1 to 40, thus. The fifth data set consists of normally distributed and correlated components (Table 5). The coefficient of correlation between w 1 and other variables were designed to change sequentially (0.99, 0.75, 0.30, –0.30, –0.75 and –0.99). In this case, the means and standard deviations of w 1 to w7 were approximately 90—110 and 25—35, respectively. Tables 1 to 5 summarize the average statistics after 100 replicated runs. The rows Test 1 and Test 2 in the tables show the number of runs for which variables x1 to x8 passed the tests after 100 runs. Note that these test results do not always sum up to 100 because in some of the runs, there were two or more variables simultaneously passed the test with equal counts for Tests 1 and 2. Table 1. Statistics of normally distributed data sets (mean values after 100 runs). BASIS w1 w2 w3 w4 w5 w6 w7 w8 Coefficient of variation 0.353 0.294 0.253 0.207 0.156 0.111 0.059 0.000 Skewness -0.024 -0.004 -0.005 0.004 0.000 -0.003 0.007 — Kurtosis 2.759 2.911 2.877 2.783 2.833 2.907 2.911 — Correlation with w1 1.000 0.016 -0.005 0.001 0.001 0.001 -0.007 — COMPOSITION x1 x2 x3 x4 x5 x6 x7 x8 Coefficient of variation 0.322 0.270 0.235 0.198 0.158 0.127 0.097 0.077 Skewness -0.194 -0.097 -0.086 0.023 0.127 0.200 0.366 0.466 Kurtosis 2.864 2.982 2.947 2.897 3.005 3.006 3.146 3.298 Correlation with x1 1.000 -0.227 -0.257 -0.261 -0.292 -0.331 -0.374 -0.431 TEST RESULTS x1 x2 x3 x4 x5 x6 x7 x8 Test 1 0 0 1 0 2 14 25 70 Test 2 (lowest 5 pairs) 0 0 0 0 0 0 7 93 Table 2. Statistics of uniform distributed data sets (mean values after 100 runs). BASIS w1 w2 w3 w4 w5 w6 w7 w8 Coefficient of variation 0.336 0.285 0.243 0.195 0.141 0.095 0.049 0.000 Skewness 0.022 0.012 0.007 -0.010 -0.040 -0.003 0.006 — Kurtosis 1.782 1.778 1.771 1.772 1.804 1.812 1.786 — Correlation with w1 1.000 -0.003 0.001 -0.005 -0.017 -0.001 -0.003 — COMPOSITION x1 x2 x3 x4 x5 x6 x7 x8 Coefficient of variation 0.305 0.260 0.223 0.185 0.144 0.112 0.086 0.073 Skewness -0.009 0.005 0.018 0.089 0.132 0.182 0.249 0.340 Kurtosis 1.888 1.929 1.976 2.118 2.339 2.549 2.689 2.817 Correlation with x1 1.000 -0.246 -0.245 -0.265 -0.297 -0.334 -0.379 -0.412 Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 8
9 TEST RESULTS x1 x2 x3 x4 x5 x6 x7 x8 Test 1 0 1 0 2 5 22 28 62 Test 2 (lowest 5 pairs) 0 0 0 0 0 0 5 95 The data sets shown in Tables 1 and 2 represent a case in which every component is normally and uniformly distributed, respectively. For both the normal and uniform cases, the detection ability of Test 1 in selecting the true unchanging component ( x8 ) was better than 60%. This result may appear to be unsatisfactory, but Test 1 chose x6 and x 7 in the cases when these were nearly invariant variables. Therefore, Test 1 detected the true or nearly unchanging components in majority of the 100 replicated runs. The detection ability of Test 2 was almost perfect (>90%; Tables 1 and 2). These results suggest that although both tests successfully detected the unchanging and/or least changing components, Test 2 generally performed better than Test 1. Table 3. Statistics of negatively normal-skew distributed data sets (mean values after 100 runs). BASIS w1 w2 w3 w4 w5 w6 w7 w8 Coefficient of variation 0.190 0.173 0.174 0.162 0.169 0.154 0.154 0.000 Skewness -0.192 -0.512 -0.611 -0.767 -0.787 -0.861 -0.879 — Kurtosis 2.944 3.231 3.057 3.367 3.271 3.447 3.492 — Correlation with w1 1.000 0.004 -0.013 -0.004 0.004 -0.000 0.006 — COMPOSITION x1 x2 x3 x4 x5 x6 x7 x8 Coefficient of variation 0.181 0.171 0.172 0.163 0.171 0.158 0.156 0.060 Skewness -0.045 -0.246 -0.308 -0.416 -0.411 -0.378 -0.443 0.657 Kurtosis 3.126 3.368 3.206 3.492 3.448 3.567 3.416 3.667 Correlation with x1 1.000 -0.172 -0.194 -0.162 -0.113 -0.171 -0.161 0.002 TEST RESULTS x1 x2 x3 x4 x5 x6 x7 x8 Test 1 2 2 0 0 0 0 0 96 Test 2 (lowest 5 pairs) 0 3 0 0 2 5 1 89 Table 3 shows the case in which the basis artificial data set has varying degrees of negative skewness (from 0.0 to –0.9) and varying coefficient of variation (from 0.01 to 0.40). Both Test 1 and 2 were almost perfect in detecting x8 (Table 3). The performance of Test 1 was improved compared with the cases in Tables 1 and 2, because the differences between V xi x8 and V x8xi becomes more apparent when the data are negatively skewed (see Fig. 2). Table 4. Statistics of positively normal-skew distributed data sets (mean values after 100 runs). BASIS w1 w2 w3 w4 w5 w6 w7 w8 Coefficient of variation 0.161 0.119 0.117 0.117 0.105 0.109 0.102 0.000 Skewness 0.246 0.483 0.690 0.829 0.824 0.902 0.892 — Kurtosis 3.031 3.122 3.490 3.566 3.404 3.577 3.652 — Correlation with w1 1.000 -0.005 0.002 -0.008 0.006 -0.014 -0.007 — Proceedings of the 4th International Workshop on Compositional Data Analysis (2011) Egozcue, J.J., Tolosana-Delgado, R. and Ortego, M.I. (eds.) ISBN: 978-84-87867-76-7 9