Computing Kernel-Smoothed Conditional Quantiles from Many Observations
Abstract Quantiles of a variable Y conditional on another variable X, when plotted against X, can be a useful descriptive tool. These plots give a quick impression of the functional form of the relation between X and the location, spread, and shape of the conditional distribution of Y. If several Y are observed for each X, then sample quantiles could be calculated for each X. The resulting quantile plot may be quite noisy, however, and smoothing across X may be desired. This article presents an algorithm that calculates kernel-smoothed conditional quantiles with a cross-validation choice of bandwidth for X. It is computationally feasible for large data sets when X assumes a small number of values since it requires only one pass through the full data set. The cross-validation does not require a pass through the data because of simplifications arising from the L 1 loss function being based on absolute values. The technique is illustrated by plotting the conditional quantiles of the net wealth of a sample of...