Abstract
An efficient algorithm to fit and tune kernel quantile regression models based on the majorization-minimization (MM) method. It can also fit multiple quantile curves simultaneously without crossing. The package depends on R (>= 3.5).
Introduction
While standard regression models the conditional mean of a response variable, quantile regression offers a more complete picture by modeling specific percentiles, such as the median or the 90th percentile. When relationships are non-linear, Kernel Quantile Regression (KQR) is employed to capture complex patterns. However, KQR traditionally faces two major hurdles: high computational complexity and the "quantile crossing" phenomenon, where independently fitted curves overlap in a statistically nonsensical manner. The fastkqr package addresses these issues by providing high-performance algorithms that enforce non-crossing constraints across the entire solution path.
Methodology
The package implements two primary approaches to kernel quantile modeling:
- Standard KQR (
kqr): This function utilizes an accelerated proximal gradient descent algorithm. To handle the non-differentiable nature of the quantile "check function," the implementation employs Huber smoothing (controlled by adeltaparameter). This approach ensures faster convergence and more stable numerical behavior compared to generic solvers. - Non-crossing KQR (
nckqr): To prevent curves from overlapping,fastkqruses a Majorization-Minimization (MM) method. This approach fits multiple quantile levels simultaneously, incorporating constraints that keep the curves strictly ordered.
Ensuring Logical Consistency
The standout feature of fastkqr is its ability to fit multiple quantile curves while strictly enforcing non-crossing constraints. This is achieved through the nckqr function, which treats the estimation of multiple quantiles as a joint optimization task. This function allows users to extract coefficients at specific penalty parameters, often denoted as $\lambda_1$ and $\lambda_2$, which control the model's complexity and the non-crossing enforcement.
Model Selection and Tuning
The package is designed to integrate seamlessly into the R ecosystem, following conventions similar to the glmnet library. It includes built-in cross-validation functions, such as cv.kqr and cv.nckqr, to select optimal tuning parameters. These functions allow for fine-grained control over the cross-validation process, including the number of folds and specific lambda sequences.
Practical Application
The package's utility is demonstrated using the GAGurine dataset, a classic benchmark for non-linear regression where the variance of the data changes with the predictor (heteroscedasticity). By leveraging proximal gradient methods and MM algorithms, fastkqr provides a robust and efficient alternative to existing KQR solvers, which often rely on slower quadratic programming methods.
Conclusion
fastkqr offers a powerful toolset for researchers and practitioners needing to model conditional distributions accurately. By solving the quantile crossing problem and optimizing computational performance, it enables the application of kernel quantile regression to larger and more complex datasets while maintaining logical consistency in the resulting models.
Summary updated