Computing Finite Mixture Estimators in the Tails

The finite mixtures approach identifies homogeneous groups within the sample. The data are aggregated into classes sharing similar patterns without any prior knowledge or assumption on the clustering. These clusters are characterized by group-specific regression coefficients to account for between groups heterogeneity. Two different approaches have been independently defined in the literature to compute this estimator not only at the conditional mean but also in the tails. One approach allows the grouping to change according to the selected location. The other defines the clusters once and for all at the conditional mean, and then moves the estimation to the tails, focusing on cluster specific estimates and allowing between groups comparison. Here we compare the behavior of both approaches, and in addition we consider a closely related estimator based on expectiles, together with few others more robust, quantile-based estimators. A case study on students’ performance concludes the analysis.


Introduction
The finite mixture (FM) approach (McLachlan & Peel, 2004) assumes that the population comprises G homogeneous subgroups. For each subgroup, a probability density function describes the data generating process, and each cluster is characterized by group-specific sets of regression parameters. The data are assumed to be drawn from a population divided into clusters that share functionally similar patterns. Homogeneous groups within the sample are identified and the regression coefficients are computed in each group. The impact of the predictor variables differs between classes and are these differences that determine the class membership. The class-specific coefficients are computed without any prior knowledge or assumption on the clustering. It is a model-based clustering to account for between groups heterogeneity (Compiani & Kitamura, 2016). Vice versa, neglecting groups heterogeneity leads to misleading results: the estimated coefficients would average the true values of each group without mirroring anyone; the estimated error variance would be larger due to groups heterogeneity, thus causing flawed inference (Van Horn et al., 2013).

3
In the linear regression model, y i = x ′ i + i , the standard finite mixture estimator relates the dependent variable y i to the set of p explanatory variables x i while a nonobservable latent variable z i denotes the subgroup each unit belongs to. For a unit in the k th group, with k = 1, .., G , the regression model is The probability for a generic unit to belong to the k th component is denoted by k . The number of clusters in the model is endogenously determined, and z i is a non-observable latent variable determining for each observation its involvement in one group or another. The z i is usually approximated by closely related observable variables. For each observation, the probability of inclusion in a group, k , is function of the latent variable z i , which assumes values 0 or 1 to define the exclusion or the inclusion of the i th observation in the specific k th group: The likelihood combines the conditional likelihood of each class weighted by the associated latent-class probability.
Unfortunately, we do not know from which group an observation is drawn, the observed sample is incomplete since the latent variable z i is unobservable. However, z i can be approximated by a subset of group-specific explanatory variables x iq , with q ≤ p , and this subset is used to model the prior probability of component membership. A multinomial logit model computes k as where g(x iq ) is the function relating the probability of being in the k class to the characteristics in the x iq subset. It is a model-based clustering approach where the mixture proportions are a logistic model, and the mixture components are linear models. The outcome variable distribution depends on both the covariates in x i and the latent cluster membership variable z i . Further details can be found in Bouveyron et al. (2019).
The estimation is an iterative process. The expectation-maximization (EM) algorithm (Dempster et al., 1977) computes the probability to belong to a given group by (4), yielding the probability weights. Next the weighted regression parameters are estimated in (3), and the iterations update weights and regression coefficients until convergence is reached. Alfò et al. (2017) and, independently, Furno and Caracciolo (2020) extend the finite mixture approach to the tails of the y i conditional distribution, at the quantiles.
The normality based MLE is sensitive to outliers or heavy-tailed error distributions. Alfò et al. (2017) assume an asymmetric Laplace distribution to compute quantile regressions within the likelihood framework, since quantile regressions ensure robust estimates. To model group heterogeneity, they introduce a set of individual specific random effects b k in the linear model (1): (1) where w i is a q subset of the design vector x i , w i = x iq , with q ≤ p. The b k vary across groups and it is usually assumed that E(b k ) = 0 to ensure identifiability of the vector. The b k are the group coefficients and are meant to model unobserved group-specific heterogeneity, accounting for dependence between responses recorded within the same cluster. The vector provides the global set of parameters shared by the entire sample. Equation (5) defines a random effect model, with b k providing the random coefficient effect.
In addition, Alfò et al. (2017), by introducing specific weighting systems, extend the model to compute expectiles and M-quantiles. Expectiles move toward the tails the regression computed at the conditional mean and, just like OLS, the estimates are affected by outliers. The M estimator, that replaces the least squares criterion by a robust criterion, is one of the most used robust regression estimators, and the M-quantiles combine the outlier detection of the M estimator with the shifting location of the quantile regression. Furno and Caracciolo (2020) consider a different version of the finite mixture estimator. The focus is on dividing in homogeneous clusters the data set, excluding the b k term, to analyze between groups comparison at the conditional mean, i.e., computing the standard FM estimator. Then the finite mixture model is moved toward the tails by implementing quantile regressions on the observations modified by the probability weights k as estimated at the conditional mean.
The difference between the two approaches is in the modelling of heterogeneity. Both approaches implement finite mixture not only on average, at the conditional mean, but also in the tails of the conditional distribution of the dependent variable. In Alfò et al. (2017) the individual heterogeneity is defined by the random effect term b k , and the grouping varies with the quantiles. In Furno and Caracciolo (2020) the heterogeneity is modelled by splitting the sample into homogeneous sub-groups at the conditional mean. Once defined the clusters, the regression model is estimated in the tails within each class, and the grouping does not vary across quantiles.
The simulations look at relative bias, dispersion, expected shortfall and Akaike values. In addition, contaminated error distributions − a standard approach to generate outliers − are considered in the simulations. Bartolucci and Scaccia (2005) specifically suggest implementing finite mixture regressions to model mixtures of normal errors. This set of experiments is particularly suitable for the Furno and Caracciolo estimator, with one group describing the central/good data and the other group gathering the outlying/tail observations. With heavy contamination, the relative bias increases. Bai et al. (2012) show how maximum likelihood is sensitive to non-normality and they suggest to robustify finite mixture regressions by computing a robust regression in the EM steps of the iterations. We embed this idea into our framework by initializing the FM estimation process with a robust regression, i.e., pre-multiplying the original data by robust weights to curb outliers before implementing the analyzed estimators. This approach sizably improves the relative bias in the Furno and Caracciolo estimator, particularly for the random slope coefficient, and reduces the expected shortfall. Finally, increasing the number of groups G improves the average Akaike values in the Furno and Caracciolo estimator.
The case study analyzes Italian students' score at international OECD-PISA math test in year 2009 as influenced by schools' characteristics. Students' scores are split in 2 and in turn 3 groups sharing similar characteristics, like school size and curricula. The academic and technical track are highly beneficial with respect to vocational schools, and their improvement declines across quartiles, for the best students, where the quartiles represent different proficiency levels. The gender gap is quite sizable at all quartiles, for low/medium/high scoring students. Regional gap and school size are negative but improve across quartiles. Increasing the number of groups and of explanatory variables improves the Akaike value.

The Tail Estimators
By assuming an asymmetric Laplace distribution, Alfò et al. (2017) estimate model (5) at any chosen location, the center or the tails of the conditional distribution. Formally, their model considers the likelihood function for a finite mixture of distributions in the exponential family, defining the distribution of the response variable for the i th measurement in the k th cluster of the finite mixture model.
Equation (6) computes for each group/component of the finite mixture the group probability k and the regression coefficients . In (6) while the b k differ across groups, the vector is unique for the entire sample.
Equation (6) can be estimated in the tails within each group by implementing the quantile regression estimator (Koenker, 2005). The quantile estimator introduces the asymmetric weights and 1 − , with 0 ≤ ≤ 1, to move the regression model away from the conditional mean. The finite mixture quantile regression estimator can be defined by . For instance, to estimate the 75 th quantile regression, the estimated equation will be characterized by 75% of the observations below the 3 rd quartile, and 25% of the observations above it. It represents the regression passing through the third quartile of the conditional distribution of the dependent variable, given the selected covariates. The asymmetric weights assign the value = 0.75 to the larger observations to attract the estimated equation upward, and (1 − ) = 0.25 to the remaining data. The k weights are free to change, so that the grouping can differ across quantiles.
By introducing an additional weighting system to control for outliers, ( ik ), Alfò et al. (2017) compute a finite mixture M-quantile regression estimator, that besides the probability k , combines i) the asymmetric weights defined to move the regression toward the tails with ii) a bound to constrain outliers within each group. Bai et al. (2012) suggested to replace the least squares criterion by a robust criterion. Based on a Monte Carlo study, they show robustness and efficiency gains of their approach when there are outliers in the data, and their results are comparable to the traditional MLE under normality. The quantile regression estimator, and the quantile FM regression estimator in (7), provide results that are robust to anomalous values. However, when the model is estimated at very low/ high quantiles outliers can affect the estimated coefficients. The M-quantile estimator, by bounding exceedingly large errors, grants robustness even at very low/high quantiles, thus improving upon the quantile estimator in (7).
The finite mixture M-quantile estimator, at the selected location θ, is defined by the following asymmetrically weighted first order conditions The above function is the Huber (1981) loss function, and the tuning constant generally selected, c = 1.345, is the bound constraining large errors. Its value is determined by bounding the influence of residuals in the Huber estimator, or the influence of both residuals and explanatory variables in other robust estimators, like in Hampel et al. (1986).
Finally, an additional finite mixture regression estimator can be considered. The standard expectile estimator moves the OLS regression toward the tails by simply introducing asymmetric weights to change location. It maintains the OLS characteristics: ease of computation and non-robustness to outliers. The finite mixture expectile regression estimator combines the asymmetric weights defining the location and the clustering weights identifying the groups. It is defined as follows Summarizing, the quantile regression estimator in (7) provides results that are robust to anomalous values. However, when the model is estimated at very low/high quantiles outliers can affect the estimated coefficients. The M-quantile estimator in (8), by bounding exceedingly large errors, grants robustness even at very low/high quantiles thus improving upon the quantile estimator. The expectile estimator in (9), vice versa, is not robust at all. The ( ) weight is simply a shifting term that moves toward the tails the regression model. Equation (9) computes the standard OLS estimator when =0.5. Furno and Caracciolo (2020) in the clustering approach of model (1) follow a slightly different method. They first compute the finite mixture model at the center of the conditional distribution, iterating between (3) and (4). Once grouped the observations into homogeneous clusters, an asymmetric weighting system computes (1) in the tails of the conditional distribution within each group. The standard finite mixture approach provides the group probabilities k and the estimated model at the conditional mean. Next, for units in group k as defined by the FM class probability weights k , the quantile regression is computed. This approach does not allow to change the definition of the groups across quantiles. On the other hand, it allows to compute as many sets of parameters as the number of classes G and to compare groups at each quantile. It does not consider a general vector together with group specific b k , but many vectors, one for each homogeneous class, thus allowing between groups comparison with respect to each explanatory variable. Equations (7), (8), and (9) are implemented within each of the groups already estimated at the conditional mean, and become with being the usual quantile regression check function while the M-quantile bounding function is and the expectile function is . In Furno and Caracciolo (2020) the individual specific parameters b k are not considered since the classes are computed once and for all at the conditional mean and do not change when moving to the tails. This simplified definition of the estimator allows to analyze between classes differences with respect to each explanatory variable, since there are as many estimates of the vector as the number of classes.

Simulations
To compare results the same simulation scheme in Alfò et al. (2017) is here implemented. The simulations are computed in Stata, version 15. The Stata codes are in Appendix 2.
The model is a random coefficients equation defined as the error term is in turn a standard normal or a Student t with 3 degrees of freedom, t 3 ; the vector assumes values ( 1 , 2 , 3 )' = (100, 2, 1)'; b 1i and b 2i are individual specific random parameters distributed in turn as a standard normal or a Student t with 3 degrees of freedom; x 2ik is defined as the sum of two independent standard normal; x 3ik is a binomial B(100;0.5); the sample size is n = 100 and there are 1000 iterations for each experiment.
The first set of experiments considers the standard normal distribution for b 1i , b 2i , and the error term. The second set of experiments considers Student t distributions.
The analyzed estimators are the finite mixture model at the quantiles together with its variants defining M-quantiles and expectiles. The estimators are computed at the locations =0.25, 0.50, 0.75, respectively at the first, second, and third quartile, M-quantile, and expectile regressions. The last two estimators are computed only for (10) to (12).
As mentioned, the tail finite mixture estimators can be implemented in two different ways. Both estimators are computed in Stata, and the steps are the following i) estimate FM at the conditional mean to compute the group probability weights k ; ii) pre-multiply the observations by the group probability weight k ; iii) compute quantile, expectile, M-quantile for the probability weighted data.
For both the assumption of constant clusters across quantiles is considered.This assumption helps quantifying the pay-off of changes in the group composition across quantiles assumed by the Alfò et al. (2017) estimator. The random effect results are presented in Tables 1 and 3, fmquantile in the tables. A unique vector − representing the fixed effect model − is estimated for the entire sample. These results are computed by constraining the coefficients of the finite mixture to be the same across groups, with the sole exception of the constant term that changes to capture the individual randomness b k . Then the data are modified by the probabilities to belong to each group as in ii). Next group 2 data are appended to group 1 (with 3 groups, group 3 should be appended to group 1 and 2 data). A single quantile regression on the twice long data set (three times long when G = 3) is computed to obtain a single vector for all groups. In case the constant term of each group is of interest a dummy variable is added to the estimated regression (two dummy variables if G =3 and the group 3 intercept is relevant). These codes are in Appendix 2.
To compute (10) to (12) estimators the data set is divided into G =2 sub-groups, there is an estimated vector for each sub-group and the results are reported in Tables 2, 4, and 6, fmq in the tables. Finite mixture expectiles and M-quantiles are computed only for the Furno and Caracciolo (2020) estimator, respectively fm expectile and fm M-quantile in the tables, and their behavior is summarized below the quantile fmq results.
For each estimator the relative bias and its dispersion are reported in the tables. The average expected shortfall in 1000 iterations, ES, and the average Akaike statistics are also collected, together with their dispersion in the iterations. To compute Akaike in the quantile regression, the estimated likelihood is replaced by the estimated quantile regression objective function, as defined in Behl et al. (2014). In detail, the Akaike values for the quantile regression are computed by AIC = nlog 10 � ∑ , where e i are the quantile regression residuals, p the number of parameters, and n the sample size. However, the use of the L 1 norm for the quantile regressions in place of the L 2 norm of OLS and maximum likelihood does not allow to compare the Akaike values of different estimators like quantile and expectile. A comparison is possible only within the same estimator as computed in differing models. Table 1 reports the average relative bias of the estimated coefficients, 1 , 2 , 3 , over 1000 iterations and the standard deviation for the random effect model (5). The errors and the random effects b k are normally distributed, in the top section of this  Alfò et al. (2017) tables, but the dispersion of Table 1 is sizably smaller than in the Alfò et al. (2017) tables. Both effects, a greater bias coupled with a smaller dispersion, can be related to the constraint here imposed: besides constant coefficients across groups, except for the intercept that is free to change to account for the quantile and the individual heterogeneity, we add constant clustering across quartiles. This seems to cause larger bias but smaller dispersion. Focusing on Table 1 below, the dispersion is generally larger for the 3 slope, that is not a random coefficient; the bias increases at the upper quartile; the Akaike values are nearly stable, while the expected shortfall increases with . Table 2 presents the estimates of (10) to (12) computed in two homogeneous subgroups. In this table there are two estimated vectors, one for each group. Therefore, the estimated coefficients do change both across quartiles and between groups. Once computed the class probability k , the quantile, the M-quantile and the expectile regressions are computed using weighted observations k y i = weighty, k x 1i = weightx1, k x 2i = weightx2. Stata provides the code qreg weighty weightx1 weightx2 to compute the finite mixture regression at the chosen quantile, while for the expectile and the M-quantile estimators an additional shifting weight is introduced to move the OLS and the Huber robust regression upward or downward, away from the conditional mean (these codes are reported in Appendix 2). The relative bias of the quantile, expectile and the M-quantile FM regression estimators are in Table 2. Comparing fmq with fmquantile results in the previous table, the constant term is generally under-estimated in both; the 3 relative bias is the largest although it is not random in both tables; the dispersion of fmq is smaller than in Table 1 but for 2 ; the fmq Akaike values are smaller than in fmquantile of Table 1. In Table 2 the fm M-quantile empirical distributions are generally more dispersed than the others, but provide the smallest expected shortfall, ES, in most experiments since it bounds outliers. Looking at the Akaike criterion, as mentioned the fm expectile regression yields the largest values since its objective function is in terms of squared residual, followed by the finite mixture M-quantile regression, where the squared residuals are bounded and cannot grow beyond the chosen bound, and by the fmq that is characterized by the smallest Akaike values since the quantile regression objective function considers the absolute value and not the squares of the residuals.

Results
Next the standard normal error distribution is replaced by a heavily contaminated normal, 30%, with a contaminating distribution N(50,100), while the Student t error distribution is replaced by a 10% contaminated Student t with a t 6 central distribution and a t 3 contaminating distribution. This set of experiments looks at the performance of the finite mixture estimators when there are two distributions generating the sample. In this set of experiments the b k in model (5) − or the k grouping probability in (10) to (12) − mirror the individual characteristics, or the between group heterogeneity, together with this more complex data generating process. This set of experiments is particularly suitable for the (10) to (12) estimators, with the central distribution describing one group and the contaminating distribution describing the other group of tail observations. Bartolucci and Scaccia (2005) specifically suggest implementing finite mixture regressions to model mixtures of normal errors. Of the two contaminating schemes selected, the contaminated normal defines a bimodal distribution with very differing variances, while the Student t contamination defines a unimodal distribution. Table 3 reports the results for the Alfò et al. estimator, while Table 4 considers the estimated coefficients in (10) to (12). When comparing Table 3 with Table 1, the relative bias has a slight increase, and the dispersion increases with contaminated normal; the contamination increases the Akaike values as well. In the Student t contamination case, the results of the two tables are comparable.
In Table 4 the sample is divided in two sub-groups to better account for between groups heterogeneity, yielding two vectors of estimated coefficients − one vector for the group generated by the central distribution and the other for the data generated by the contaminating distribution − for the (10) to (12) estimators. The results can be compared with those in Table 2. Bias and dispersion increase in the upper section of the table but for 1 , with heavily contaminated normal errors, together with the Akaike results. The increase in bias and dispersion is quite limited in the bottom section of the table with Student t contamination, as found in fmquantile. This is due to the different contamination scheme: in the normal contamination the data are bimodal with a contaminating distribution characterized by very large mean and variance − = 50 and 2 = 100 for the contaminating normal versus = 0 and 2 = 1 at the center. This is not the case in the Student t error contamination, where the contaminated error distribution is unimodal, centered on = 0, and the variance of the two Student t distributions are not too far apart, 2 (t 6 )=1.5 versus 2 (t 3 ) = 3 for the contaminating distribution.
In Table 4 the relative bias is smaller in the finite mixture M-quantile regression estimator. Group 2 estimates are more dispersed than group 1, possibly caused by the larger variance of the contaminating distribution, 2 =100 and in turn 2 (t 3 ) = 3, since group 2 seems to gather the observations generated by the contaminating distributions. In the experiments with contaminated distributions, it seems preferable to separately compute the coefficients vector in each class, thus untying the impact of the observations generated by the central distribution from the effect of those generated by the contaminating one. Tables 5 and 6 report a different set of experiments. Following Bai et al. (2012), before implementing the finite mixture regression model, a robust regression is estimated. They compute a robust regression in the EM steps of the iterations, but this is not doable in Stata that provides a unique code to compute FM. Therefore, we implement a robust regression before running steps i) to iii) of our approach. The robust regression Stata code is rreg y i x 1i x 2i , genwt(name). Then we pre-multiply the data by these weights, yielding namey = name*y i , namex1 = name*x 1i and namex2 = name*x 2i , then we implement steps i) to iii) on this modified data set. This approach could be particularly useful in the contaminated error distributions since the anomalous values in the tails are automatically bounded by the robust weights. It adds an initial step, provided by a robust regression, that yields weights to curb outliers. These weights modify/bound the observations and the transformed data are then analyzed by the finite mixture regression estimators at the center and in the tails for the contaminated distribution experiments. The comparison of this set of results with the values in Tables 3 and 4 shows that the robust regression initializing procedure provides a sizable reduction in the relative bias in all the experiments with contaminated normal errors, particularly for 2 , and in fmq even the standard deviation decreases. The expected shortfall decreases in many experiments. The introduction of an initializing robust step provides very good results and confirms the validity of the Bai et al. (2012) approach.
Finally, Tables 7 and 8 consider a 3-group finite mixture regression model estimated in the tails, at the 25 th and 75 th quartiles, in the case of contaminated error distributions.
The 3-group model shows a reduction in bias, dispersion, and expected shortfall, while the Akaike values of Table 7 are slightly larger than in Tables 3 and 5. In the constant clustering estimator, fmq, characterized by the smaller Akaike values due to its definition, it is not easy to choose between the 2 or the 3-group models since there is not a unique synthetic statistic. The Akaike criterion is indeed estimated within each group. An average Akaike value across groups could be computed for comparability's sake. In the fmq estimator, the -the constant term is systematically under-estimated in each table; the relative bias increases in fmq with respect to fmquantile while its dispersion is smaller but for the 2 random coefficient slope. -with heavy contamination, like in the contaminated normal experiments, the relative bias increases, less so in the Student t experiments that model a milder contamination. The fmq estimator would be preferable with contamination since one group could model the central distribution and the other group could gather observations generated by the contaminating one. -initializing the estimation process with a robust regression in the error contamination sizably improves the relative bias and dispersion in the fmq estimator, particularly for the random slope 2 , and reduces the expected shortfall. -increasing the number of groups G with contaminated errors does not improve the Akaike in fmquantile, while in the fmq estimator G =3 improves the average Akaike values.

Case study
The math scores of 15 years old Italian students taking the OECD-PISA test on student proficiency in year 2009 is considered. The math score, y i , is explained by school characteristics to assess the link between performance and school structures. However, we select only a small number of explanatory variables − field, school size and student-teacher ratio − to streamline the discussion of the results. The field is defined by the dummy variables academic and technical to distinguish students enrolled in vocational fields; school size collects the number of students; student-teacher ratio is the ratio between number of  Table 9 reports the summary statistics. Table 10 reports the results of the finite mixture model as computed at the mean and at the quartiles. The fmq estimator splits the sample in two data driven sub-groups. Figure 1 shows the probability to belong to each group. These probabilities define the two homogeneous groups of high and low scoring students in the math test, with probability centered on 0.64 to belong to group 1 and centered on 0.36 for group 2. In the top section of the table, school size has a negative impact for group 2 at the top quartile -the highly scoring students, while it is not significant at the median and quite small at the first quartile -the low scoring ones. The academic and the technical track improve upon vocational schools particularly for group 2. The group 2 advantage due to field declines at 75 th , for the top students. At the mean and at the first quartile the between groups discrepancy due to curricula is quite sizable. At the higher quartile the group differences are less marked, although the dissimilarity between the estimated coefficients of the two groups does not disappear. The best students of each group, although performing differently, are closer one another than the low scoring students of each group, and the low scoring group 2 students profit most from the academic and technical fields. The bottom section of this table reports the estimates of fmquantile in (5), computing a single vector of coefficients and gathering heterogeneity in the group component b k . These results show the declining impact of curricula across quartile as well, but they are decidedly less informative than the clustering model estimates since they do not allow to compare groups. In the last line the Akaike values are reported as computed at the conditional mean and in the tails. As mentioned, the Akaike values can only compare the same estimator as computed in differing models. Table 11 considers a 3-group model and Fig. 2 depicts the probabilities in each group. Comparing the estimates across groups and at the various quantiles becomes more cumbersome. The third group has the largest average probability, 0.398, and shows the greatest beneficial impact of curricula, increasing across quartiles; a negative impact of the student teacher ratio and a small, mostly not significant impact of school size. The impact of the academic curriculum is negative in group 1 and more so in group 2, worsening with the quartiles i.e., for low, medium, and high scoring students. For the technical track the negative sign occurs only in group 2 at the top quantile: the highly scoring students of group 2 take less advantage from the technical curriculum with respect to group 1, that provides the baseline. The discrepancy among groups increases in the 3-group model at all quartiles. The Akaike values are smaller than in the previous table. The bottom section of the table reports the results for the random coefficient model (5). The estimates are all positive and significant, slightly larger than their analogues at the bottom section of Table 10. The 1 3 results show a declining impact of curricula and a slightly increasing impact of the other coefficients across quartile. The Akaike statistics are smaller than in the previous Table 10. Next, we introduce gender and region of residence among the explanatory variables of the model to better characterize groups and further reduce between groups heterogeneity. Gender captures the good performance of boys in math, although they do worse than girls in reading proficiency. Region of residence accounts for regional discrepancies since southern schools and in general southern regions lag the rest of the country. These additional variables turn out to be statistically significant. They help explaining part of the between groups gap. However, there are many other factors at play in diversifying the groups and our analysis is not intended to be exhaustive. A 2-group analysis eases the interpretation of the results in a model with a greater number of explanatory variables. These estimates are reported in Table 13 and Fig. 4 in Appendix 1. Table 12 reports the results for the 3-group model comprising these two additional explanatory variables. Group 1 has probability centered on 0.383, while group 2 has an average probability of 0.403. These two groups have a similar pattern, as can be seen in the left graph of Fig. 3. The average value of group 3 is the lowest and is equal to 0.213, its histogram peaks at the lower side of the graph and it looks like it takes the place of former group 2 of Fig. 2. In this table the reference class is group 1 and the negative sign of the academic coefficient in group 2 and 3 can be interpreted as a lower impact of this curriculum in group 2 and group 3 when compared to the group 1 baseline. The sign of the regional variable and of school size is negative in group 1 and group 3 at all quartiles and is positive in group 2. This can be interpreted as a generally negative effect of these two variables across quantiles, but their impact sizably improves for group 2 with respect to the group 1 baseline at each . The student teacher ratio is negative in group 1 at all quartiles, and its impact is positive in group 2 and 3 with respect to the baseline. Across quartiles, looking at low/medium/high scoring students, the regional impact improves while the .2 .4 .6 .8 1 Probability to belong to group 1 (sand) and to group 2 (navy) Fig. 1 Math scores. Probability to belong to a given group as computed at the conditional mean by the standard finite mixture regression estimator, G = 2 . Group 1 has the highest probability, centered on 0.64, while group 2 has an average probability of 0.36

Table 11
Math score at PISA test in 2009, finite mixture estimates at the quantiles,n =26,497,

groups
In italics the non-significant coefficients. Student t statistics in parenthesis. gender gap increases in each group. The academic track is increasingly negative across quartiles, i.e., for the best students in group 2 and 3. On the overall, group 1 collects the students that in Table 9 were formerly gathered in group 3. The Akaike values are smaller than in Table 11 for group 1 and 3. Moving to the bottom section of the table, the curricula show a decreasing impact across ; the regional coefficient is negative but improves over quartiles; the gender gap is quite sizable; the school size impact is negative at and above the median. Surprisingly, the Akaike results increase with respect to the previous tables.
Summarizing: the curricula are beneficial mostly for one group of students, and their impact declines for the best students; the gender gap is quite sizable at all quartiles, for low/medium/high scoring students; regional gap and school size are negative but improve in one group with respect to the baseline.

Conclusion
The analysis focuses on the behavior of the finite mixture estimators in the tails. The finite mixture regression approach assumes the population of interest as generated by homogeneous subpopulations to account for between groups heterogeneity. It identifies homogeneous groups within the sample and computes the coefficients of a linear regression model within each group. The clustering process is simultaneous with the estimation. It computes classspecific coefficients without any prior knowledge or assumption on the definition of the clustering.
Two different approaches have been independently defined in the literature: one where, assuming asymmetric Laplace distribution, the grouping is allowed to change in the tails (Alfò et al., 2017) while the coefficients are kept constant across groups. The other defines the groups once and for all at the conditional mean, before estimating the model in the tails for each group (Furno & Caracciolo, 2020). The former computes a random coefficient model while the latter splits the sample into homogeneous sub-groups at the conditional mean and computes the model in each subgroup at the selected quantile, without changing the cluster composition across quantiles. The Furno and Caracciolo (2020) approach Fig. 2 Math scores. Probability to belong to a given group as computed at the conditional mean by the standard finite mixture regression estimator with G = 3. Group 1 has an average probability of 0.287, group 2 presents the smallest average probability equal to 0.178, while group 3 has the highest average probability of 0.398 yields: i) stability of the grouping across quantiles and ii) the estimation of a coefficient vector for each group. This second feature allows a very detailed between groups comparison at the quantiles. The simulations consider normal and Student t errors and, in turn, contaminated normal and contaminated Student t errors. The results show a good performance of these estimators, particularly in the contaminated error experiments.
A case study on students' math score in the OECD-PISA international proficiency test provides an example of the performance of the tail estimator with real data. Students are grouped in two and then in three classes, according to homogeneous characteristics like curricula and school size, and the impact of the covariates at various scores quartiles represent their influence for low/median/high proficiency students. The between groups divergence due to curricula is quite sizable and shrinks at the upper quartile, for the best students; the negative impact of school size and the inefficiency of southern schools penalize two out of three groups at all quartiles. The general pattern across quantiles of the cluster model estimates is confirmed by the random coefficient model results, but a between groups comparison of each estimated coefficient is not available in the latter model due to its definition. Vice versa, the Furno and Caracciolo estimator allows a detailed between groups comparison of the estimated coefficients and a deeper analysis of their pattern across quartiles as well. Figure 4 reports the probabilities to belong to each group for the 2-group greater model. The peaks are slightly farther apart with respect to Fig. 1, and there is a slightly larger probability to belong to group 2. In the table the improvement of academic and technical track is confirmed, and the between groups difference across quantiles decreases as increases.  1 3

Appendix 1: 2-Group Model with Additional Variables
School size becomes negative and statistically significant for group 2 even at the median. The gender difference between groups increases across quartiles and is quite sizable at the top. The regional penalty declines across quartiles and is more burdensome for group 2 students. The bottom section of the table computes the model as in (5), with a unique vector of coefficients while placing the between group heterogeneity in the b k component. The results validate the improvement of academic and technical track-declining across quartiles; the negative impact of the southern regions-slightly milder toward the top; a gender gap increasing with the score. Vice versa, the negative impact of school size at and above the median is not validated when computing a single vector for all the groups. This estimator generally yields intermediate results, sort of averaging group 1 and group 2 estimates of the Furno and Caracciolo estimator.