Conditional vs. Unconditional Quantile Regression Models: A Guide to Practitioners

This paper analyzes two econometric tools that are used to evaluate distributional effects, conditional quantile regression (CQR) and unconditional quantile regression (UQR). Our main objective is to shed light on the similarities and differences between these methodologies. An interesting theoretical derivation to connect CQR and UQR is that, for the effect of a continuous covariate, the UQR is a weighted average of the CQR. This imposes clear bounds on the values that UQR coefficients can take and provides a way to detect misspecification. The key here is a match between CQR whose predicted values are the closest to the unconditional quantile. For a binary covariate, however, this relationship is not valid. We illustrate these models using age returns and gender gap in Argentina for 2019 and 2020. Article History: Received: September 17 2021 / Revised: November 08 2021 / Accepted: November 19 2021


Introduction
In many research areas, it is important to assess the distributional effects of policy variables and key covariates. From a policy maker perspective, an intervention that helps to raise the lower tail of an income or wage distribution is often more appreciated than an intervention that shifts the upper tail of the distribution, even if the average effect is the same. Also an intervention that generates inequality in the distribution of income may be judged inferior to another one that produces less dispersion, even when the average effect may favor the former. This paper analyzes two econometric tools that are used to evaluate these effects, conditional quantile regression (CQR) and unconditional quantile regression (UQR). Our main objective is to shed light on the interpretation of these two methods from the perspective of an applied practitioner, and to focus on the similarities and differences between these two methodologies.
As a starting point, let's specifically define the nomenclature used in the literature (see Fortin et al., 2011). On the one hand, the Conditional Quantile Partial Effect (CQPE) refers to the effect of a covariate (ceteris paribus) on a conditional quantile of an outcome variable, while the same concept on the unconditional distribution is the Unconditional Quantile Partial Effect (UQPE). Conditional here means that we are controlling for the effect of other covariates. On the other hand, CQR and UQR refer to two regression methodologies to estimate CQPE and UQPE, respectively. Sometimes the acronym of the method is informally interchanged with the parameter of interest and therefore can be somewhat confusing if read lightly.
Quantile regression (QR) (see Koenker and Hallock, 2001;Koenker, 2005, for a comprehensive analysis of QR) is a useful way to represent heterogeneity using a set of parameters to characterize the entire conditional distribution of an outcome variable given a list of observable covariates. Let us consider a Mincer equation as a canonical example, i.e. wages as a function of observable workers' characteristics (see Arias et al., 2001, for an illustrative application of QR to this case). The conditional quantiles refer to the salary ranking generated by unobserved characteristics of the individuals (usually ability, motivation, etc.), controlling for the effect that comes from the observables or rather conditional on those observables (experience, educational level, gender, employment sector, etc.). The τ ∈ (0, 1) index refers to a particular position or rank in the conditional distribution of unobservables, such that τ proportion is below and 1 − τ is above, i.e. for high ability (τ H ) vs. low ability (τ L ). In a simple analysis of the gender gap on wages, QR provides a tool to study heterogeneity in the gender differences across wages in the conditional distribution. Thus the effect at the τ th-quantile refers to the wage difference between female and male workers that share the same level of observables covariates and that are located in the same position of the conditional ranking. In another example, say the effect of age on wages, the CQR coefficients estimate the impact of changing from a value x to x + t (where t is small) for the subpopulation that is located in the τ part of the conditional distribution and that also share the same values of other covariates (CQPE). Again we may have a different effect depending on the ranking of unobservables. Note that in this context, x is a particular value of the covariate of interest.
The combination of QR with simulation exercises is usually implemented to evaluate distri-butional effects. While it is feasible to calculate the unconditional distribution of wages using QR (see Autor et al., 2005;Machado and Mata, 1995;Melly, 2005), this task is not obvious, at least compared to OLS for the conditional mean. Since the law of iterated expectations does not hold in the case of quantiles, the conditional QR analysis cannot be used directly to analyze unconditional quantiles (see the discussion in Fortin et al., 2011). The unconditional quantiles refer to the location in the distribution of the entire wage distribution, making the emphasis in high or low wage values, not necessarily for individuals with the same value in the covariates. It could be the case that those in the η quantile location of the unconditional distribution have certain endowments that makes the comparison with the CQR unclear. In the gender gap example, most high wage earners (let's say η H ) are probably mostly males. Moreover, there are female workers with a high conditional τ H (talented or motivated workers) but most of them located in the low quantile region (say η L ). Firpo et al. (2009) propose an implementation of a known statistical tool, the influence function, to evaluate the impact of changes in the covariates on a statistic that depends on the unconditional distribution. Those authors defined that method recentered influence function (RIF) regression where a regression of the RIF on covariates allow to study the marginal effect of a "change" in those covariates. The potential simplicity and flexibility the methodology offers for the analysis of any distributional statistics also motivated subsequent research to expand the use of RIFs in the framework of regression analysis. After its introduction, UQR, i.e. RIF applied to studying the effect of covariates on the unconditional quantiles, became a popular method for analyzing and identifying the distributional effects on outcomes in terms of changes in observed characteristics in areas such as labor economics, income and inequality, health economics, and public policy. This paper is motivated by the necessity of providing an interpretation of CQPE and UQPE, and also for better understanding the connection between both concepts. We show that the interpretation is as follows. First, for a continuous covariate, the UQPE is determined by a location shift in the entire distribution of a covariate, where the shift corresponds to changing from a random variable X to another X + t, where t is small. In the age covariate example, this means evaluating an intervention where the entire labor force is older by one year. Depending on the joint distribution of wages and age, this movement may have an impact that is different at η L than at η H . Suppose that a relative higher proportion of conditional high ability (indexed by τ H ) are located in the high η H part of the unconditional distribution, and that age has a CQR higher impact on high ability than in low ability. Then the UQPE of age on wages should have a larger effect on η H vis-à-vis η L . Second, for binary covariates, say D, while the CQPE was clearly understood using regression type tools, for UQPE is not. The key is that the RIF exercise proposes to move the probability of D = 1 instead of a particular value D. Then, for the gender gap example, the UQPE should be interpreted as marginally shifting the propensity score of female vs. male, i.e. the proportion of each type. That is, uniformly changing the gender proportion in the sample.
An interesting theoretical derivation to connect CQPE and UQPE is that, for the effect of a continuous covariate, the UQPE is a weighted average of the CQPE. This imposes clear bounds on the values that UQR coefficients can take and provides a clear connection between CQR and UQR. The key here is a match between CQR whose predicted values are the closest to the unconditional quantile. In fact, the connection of both concepts for the continuous case is useful as a guide to evaluate the correct specification of the regression model. Unfortunately, a similar relationship for a binary covariate does not exist in the literature. We derive a new theoretical result that allows a comparison of the two effects. The analytical results presented here may serve as a guide for understanding the reason of the observed CQR and UQR effects.
This paper is organized as follows. Section 2 discusses CQR models. Section 3 presents UQR. Then Section 4 presents a comparison of this two methods. Section 5 applies this estimators to the study of age and gender effects in wages for Argentina using 2019 and 2020 household surveys. Section 6 concludes. The Appendix A contains mathematical proofs and Appendix B a brief introduction to empirical implementation in STATA and R.

Conditional Quantile Regression
Let Y be the response variable and X be a p × 1 dimensional vector of covariates. The mean and quantile linear regression models are two well known models to estimate the effect of certain covariates on a response variable.
Mean regression (MR) considers the effect of X on Y through the conditional mean model where in this model β M is p × 1 dimensional vector of coefficients.
In quantile regression (QR) the conditional quantiles of Y are of interest through the models In this simple linear model, the parameters β(τ ) measure the conditional quantile partial effect (CQPE) of increasing X, that is: Therefore, β(τ ) measures the effect of marginally changing X within the group of individuals characterized by the same conditional level of response, indexed by τ . Note that equation (2) implies that the right-hand side is monotone increasing in τ . In theory, the monotonicity requirement should be satisfied for all realizations of X or for some specified subspace of interest, i.e. X ∈ X (this is discussed in Koenker, 2005, p. 59). In practice, however, the monotonicity may not be satisfied for some values of X, a problem known as the quantile crossing problem: the conditional quantile curves x → Q Y (τ x) may cross for different values of τ (He, 1997). Chernozhukov et al. (2009Chernozhukov et al. ( , 2010) studies this monotonicity requirement and proposes a rearrangement procedure of the estimated quantile curves. He (1997) proposed to impose a locationscale regression model, which naturally satisfies monotonicity. Furthermore, Koenker and Xiao (2006) shows that integrating out the quantiles over (0, 1) should provide the mean effects, i.e.
The results in Koenker and Bassett (1982) establish that, under regularity conditions, the estimated conditional quantile function is a strongly consistent estimator of the population quantile function. Thus the process {Y, X} can be partially recovered from the marginal distributions, that is, the conditional distribution Y X can be described by its conditional quantiles based on τ ∈ (0, 1). The QR analysis constructs a model Y * = Y (X, τ ) in which Y * , depends on endowments X and its location in the conditional distribution given by τ . The linear QR model determines that the coefficients β(τ ) are the pricings of those endowments in the market (this is further developed in the next section). Here variation in β(.) completely absorbs the role of the unobservables in regression models. This method has been applied for the analysis of inequality by Autor et al. (2005), Machado and Mata (1995), Montes-Rojas et al. (2017), and others.
For a dummy variable (say D), the CQPE should not be obtained by partial derivatives but instead This is the difference in the τ quantiles for the population group with D = 1 vis-à-vis those with D = 0, in this case controlling for other covariates X. This type of estimator is the same used in the quantile treatment effects literature Hansen, 2005, 2006;Firpo, 2007), where we compare treated and non-treated were each group is calculated at a given ranking. If the CQR models are linear, then CQP E D (τ ) = β D (τ ), i.e. the QR coefficient of the dummy variable.

Unconditional Quantile Regression
Consider now the case of studying the unconditional quantiles, defined as We are interested in a multivariate case where we consider the joint distribution of (Y, X). In particular, to find a framework to study changes in the distribution of X on the quantiles of Y . This is first a matter of definition, i.e., what is a change in X.
A well know result is that quantiles are non-linear operators. As such, while the law of expected iterations can be applied to the conditional mean, this is not valid in general for conditional and unconditional quantiles, Therefore, the CQPE cannot be used directly to study effects in Q Y (η).
Our interest lies in defining the unconditional quantile partial effect (UQPE), but this requires to review influence function theory (see Huber and Ronchetti, 2009 for an introduction).
Consider functionals v(F ) defined on the distribution function F Y of a real valued random variable Y . Typical functionals that have been extensively used in income distribution analysis are inequality, poverty or polarization measures, which are an essential tool to study distributional impacts. Of particular relevance is the use of the influence function (IF) of v, that summarizes the marginal impact of a particular observation or group in the value of the functional. Moreover it provides a unified approach for computing variances and covariances for general functionals.
The IF is the directional derivative of v(F Y ) at F Y and it measures the effect of a small perturbation in F Y . In other words, let y be an additional data point in a large sample that adds a perturbation to the distribution with probability mass δ y .
and h Y (y) is a density function with value 0 except at y. Then, The IF of a distributional statistic (and hence of a social evaluation function) measures the relative effect of a small perturbation in the underlying outcome distribution on the statistic of interest. Within that approach and under the assumption that the distributional change in question is due to policy implementation, the IF of a social evaluation criterion may be viewed as a local measure of the distributional impact of policy. For most cases the IF can be computed analytically for a large family of functionals to study inequality and poverty (such as quantiles, variance, Gini, etc.).
The IF is a key tool to study the distributional impact of changes in covariates. The recentered influence function (RIF) is defined as For the particular case of the η-quantile, v(F Y ) = Q Y (η) = F −1 Y (η), we have (see Essama-Nssah and Lambert, 2015 for a derivation) Note that property of the RIF in eq. (9) is very interesting because it allows to compute any indicator v(F Y ) as an expectation and therefore enables us to use the Law of Iterated The conditional expression Now suppose an small location-shift of the distribution of one covariate X, that is X + t where t is small. For simplicity, consider a single covariate, but the analysis should be interpreted as a change in one covariate keeping the others unaltered. This shift affects the entire unconditional distribution of Y , moving it towards a new distribution G Y . Note here the mechanism: the distribution of X is shifted, which has an impact on the joint distribution of (Y, X), for which we want the effect on the distribution of Y . Compute the marginal change from v(F Y ) to v(G Y ): where the last equality uses the continuity of the limit.
If m(x) is differentiable at any point x, then This is the main equation in Firpo et al. (2009), which is an application of the IF theory and the Law of Iterated Expectations.
Consider now the example of a dummy variable D. In this case, the UQPE and CQPE cannot be compared using the formulas above because we need to consider discrete change. To simplify notation we only consider a model m(D, X) for the conditional expectation of the RIF, where D is a binary covariate and X is a continuous covariate. Then Then consider the following shift: and Note that when t is small the change in eq. (13) is close to P G (D = 1) = P F (D = 1) + t.
Compute the difference and use some linear properties of the expectation Finally, is the partial difference taken on the conditional expectation of the RIF.
When v(F Y ) = Q Y (η), the above procedure is defined as Unconditional Quantile Regression (UQR) and thus, for the continuous case and for the dummy variable case. Firpo et al. (2009) develop a simple regression framework that is similar to a standard regression except that the dependent variable, Y , is replaced by the re-centered influence function (RIF) of the statistic of interest. They propose m(X) = X ′ b as an approximation to the functional form of the RIF conditional expectation. The parameters b correspond to a change in the covariates on v that can be interpreted as above. In particular, as explained in Fortin et al. (2011), the RIF-regression allows for using regression type tools, such as Oaxaca-Blinder type decompositions. Note however, that this is only an approximation to a potentially nonlinear function, m(X), and as such it may fail to appropriately describe the marginal effects.

Comparison of UQR and CQR
We have established that QR measures the partial effects of moving X on the conditional distribution (CQPE), while RIF regressions do the same with the unconditional distribution (UQPE). Proposition 1 in Firpo et al. (2009) is very useful to understand the relationship between both statistics. Define the following matching function: This function finds the τ quantile in the CQPE model that is the "closest" to the η quantile in the UQPE model. It plays a central role in the following analysis.

Continuous Covariate Case
Consider first the case of a continuous covariate. Figure 1 shows a very simple example of how ξ η (x) works for the case of a one dimensional covariate. Suppose we are positioned at the median  of the unconditional distribution, that is, at η = 0.50. This value matches with the quantile 0.90 conditional on X = x 1 , but also with the quantile 0.80 conditional on X = x 2 , and so on. Then, the function ξ η (x) indicates intersections such as points 1, 2, 3, ... generating a correspondence as shown in Table 1.
A relationship between UQPE and CQPE can be established using the following equation (Proposition 1 (ii) in Firpo et al., 2009): where the weight has the following form and we allow the CQPE to depend on the value of the covariates. That is, the U QP E(η) is a weighted average of all the CQP E(τ, x) that are intersected by Q Y (η). Following the example of Figure 1, the UQPE is the average of the slopes of points 1, 2, 3,... weighted by ω η (x). If we make this calculation more explicit we can see all the factors that link UQPE with CQPE: Note that in fact, the comparison of the two models is similar to the one used in binary regression models (i.e. probit or logit) to get the average marginal effects on the probability. This is because we need to calculate the conditional expectation of When we compute the marginal effect, the derivative of the cumulated probability becomes the density function (i.e. f Y X (Q Y (η) X)) multiplied by the corresponding beta coefficient (i.e. CQPE).
Although both the marginal and joint distributions of (Y, X) intervene in the weighting factor, the heterogeneity of the weights is affected by f Y X (.) and f X (.). Let's consider two simple examples with a location-shift model where: is linear and the QR coefficients are constant across quantiles as in Figure  2, then trivially U QP E(η) = CQP E(η) for any weighting structure; ii) Q Y [s X = X] is non-linear and quadratic as in Figure 3 with X ∼ U nif orm and Y X ∼ U nif orm (such that weights are constant), then it is easy to see that CQP E(η) ≠ U QP E(η) = 0 for all η since the partial effects of the conditional distribution are offset in the tails of the distribution of X, dissappearing the effects on the unconditional distribution.  In practice, all these calculations are not really necessary since we can directly estimate CQP E(η) and U QP E(η) separately using CQR and UQR-RIF-regression, respectively. However, the relationship discussed in this section is useful to understand the origin of the differences between the two estimates.
It also suggests a way to evaluate model misspecification. In particular, if the UQPE heterogeneity exceeds that of CQPE, that is, if the effects from UQPE exceeds (in absolute values) that of CQPE, then the models are misspecified. This is a relevant issue as quantile and RIF regression are usually implemented as linear models, which could be a poor approximation to the true data generating process.

Binary Discrete Covariate Case
For the binary discrete covariate case, the function above linking UQR and CQR does not apply. However, a comparison of the eqs. (4) and (17) can be studied in the following proposition.
Proposition 1 Consider a model that only has one dummy covariate D. Then, we have the following representation with R(ξ η ) defined in the Appendix.
Proof: In the Appendix A.
This result determines that it is not possible to bound UQR effects within those of CQR as in the continuous case. That is, if we frame the case of a dummy covariate for UQR, the UQPE formula for the continuous case is incorrect. In turn, the remainder term R(ξ η ) depends on the comparison of the corresponding τ conditional quantiles coming from the matching function. That is, R(ξ η ) depends on the difference ξ η (1) − ξ η (0), and since ξ η (1) and ξ η (0) are discrete values, nothing guarantees that it is close to zero.

Empirical Application
We use microdata from the Argentine household survey, Encuesta Permanente de Hogares (EPH). This survey is carried out by the National Statistics Institute (INDEC) and collects data from 31 major urban areas, with a statistical coverage rate of approximately 62% of total population. The sampling process involves two stages based on geographical stratification-each one of the 31 cities is first divided into census radii, from which households are randomly selected. The survey's rotating scheme allows for the construction of short-term panels but we have not explored that feature in this application.
Databases are released quarterly and we will use 2019q4 and 2020q4. Note that the surveys correspond to one pre-and another post-COVID-19 pandemic. This choice stems from the fact that social confinement measures were particularly strict in most Argentine cities and we intend to check whether this may have influenced our results. Sample size is 19,662 for 2019 and 12,499 for 2020. We include all salaried or self-employed individuals aged 18 to 65.
We estimate a Mincer regression in order to illustrate the differences among conditional quantile regression (CQR), unconditional quantile regression (UQR) and ordinary least squares (OLS). In particular, we compute (i) the marginal effect of one year of age (continuous variable) on log hourly wages, and (ii) the gender log hourly wage gap between men and women (dummy variable). For the former, we calculate the marginal effect for an individual with average sample age using the delta method to get the standard errors. Formally, the estimated equation is where x is a vector that includes other covariates-education, region, citizenship, economic sector, seniority, firm size, hours and position. Figure 4 shows the empirical results for the effect of age. OLS estimates are of course independent of the quantile considered, so that one additional year of age always raises the mean  individual's wage in about 0.6%, no matter whether the individual has low or high (conditional or unconditional) wage. The CQR and UQR are somewhat different until percentile 30, where the distance between them becomes smaller. Both quantile effects are close to 1% for the highest quantiles. However, OLS seems a reasonable approximation for the effect in essentially any point of the distribution, whether conditional or unconditional. Figure 5 shows that the gap between wages of females and males is about -14%. Here the 2019 curve shows an inverted U shape pattern that is not as clear in the 2020 curve. The gender gap is particularly large in the left tail, where the CQR effect is below -20% and the UQR can reach -50%. Both CQR and UQR are located somewhat above the OLS level (around -11%) between percentiles 20 and 80, but behavior at the right tail differs between the yearly samples and therefore is more difficult to interpret.
Let us illustrate the important differences between CQR and UQR by elaborating on the latter finding. A linear model of the wage equation indicates that the gender wage gap is about 14%, but CQR shows that it can soar to 20% for the lowest conditional wages. This means that (a) Gender -2019q4.
(b) Gender -2020q4. individuals who have unusually low wages given their observables show a larger gender gap than those whose wages are closer to the mean. But it does not say anything about whether this is true for individuals whose wage is low independently of their observables. UQR shows that, not only this is also the case, but the gender gap for those individuals can be up to 50%. This determines that gender differences are not only observed after controlling for human capital variables, but the latter are also associated with gender differences in such a way that the unconditional effect is much larger.
The fact that confidence intervals overlap sometimes implies that some of these differences might not be statistically significant. This is partly a consequence of limited sample sizes. This explains why confidence intervals are narrower in the 2019 sample (that contains almost 50% more observations), thus making some differences more salient-notably, the left tail of the distribution of the gender gap, where the intervals barely overlap.
We can observe how the results of the empirical application are in agreement with the theoretical explanations. Thus, the marginal effects of the age (continuous variable) of the unconditional regressions (UQPE) are contained within the marginal effect of the conditional regressions (CQPE). However, it can be observed that for gender (discrete variable), particularly in the lower quantiles of the distribution, the marginal effects of the UQR is not contained within the conditional effect. This is because it is not possible to obtain a clear theoretical relationship between UQPE and CQPE for discrete variables.
To gain some intuition on the previous empirical results, we introduce the following CQ-UQ curve. For each value of individual i we calculate τ * i = min τ {Y i ≤ Q Y (τ x i )}, that is, the corresponding conditional quantile τ that matches closely the individual's wage. Then we estimate for all η, τ (η) = Pr (Y ≤ Q Y (τ * x) Y ≤ Q Y (η)). Then we consider the graph (η, τ (η)) that matches the unconditional quantiles η with the estimated conditional distribution in order to study if there is any relationship between the two. Figure 6 shows the results. We find that individuals with low values of τ are largely over-represented among those with low values of η, implying that the left tail of the income distribution consists mostly of individuals whose income level is low conditional on their observable attributes.
Furthermore, the CQPE-UQPE curve for men lies above the one for women, therefore the over-representation of low τ cases in the left tail of the unconditional distribution is higher for men. This could help rationalize the fact that the gender gap is larger in the low unconditional quantiles but not so much so in the low conditional quantiles.

Conclusion
This paper is motivated by the difficulty in understanding the use of two increasingly popular methods to estimate distributional impacts, conditional and unconditional quantile regression. We focus on their interpretation and establish the connection between both models from the point of view of an applied practitioner.
We study the similarities and differences of these two. In particular, we show that for the case of continuous covariates there is a clear link between these two, that is, one is a weighted average of the other. For non-continuous or binary covariates we show that the previous result does not apply, and we establish a new analytical relationship.
The present paper can be extended along several directions. First, the linear approximation of the RIF model can be studied to establish when it works and when it does not. In this case, exploring non-linear models for CQR and UQR may illustrates their potential pitfalls. Second, the analytical connection between the two motivates new estimators where CQR is estimated first, and then UQR is derived. This avoids using the RIF linear approximation. Finally, further empirical statistics based on the comparison between both methods can be informative about population characteristics.