BsplineQuantReg

Citation

If you use this package in your research, please cite:

```bibtex @Article{Abbes2026, author = {Alexandre Abbes}, title = {Quantile regression with cubic polynomial splines under shape constraints with applications}, year = {2026}, doi = {10.5281/zenodo.17427913} }

DOI

Beta Version Notice

This package is currently in beta (version 0.1.0-beta).

What to expect:

R Packages

Package Description Constraint Type Spline Degree
ConstrainedQuantileSplines (this package) Quantile regression with Karlin-Studden constraints Monotonicity, Convexity Cubic
quantreg Classical quantile regression None (linear programming) Linear
cobs Constrained B-splines Monotonicity, Convexity Linear, Quadratic

Comparison with cobs

The cobs package (Constrained B-Splines) is the closest to this package, but with key differences:

Feature ConstrainedQuantileSplines cobs
Spline degree Cubic (degree 3) Linear, Quadratic
Constraint method Karlin-Studden SOCP Traditional constraints
Convexity ✅ Yes ✅ Yes
Monotonicity ✅ Yes ✅ Yes
Quantile regression ✅ Yes ✅ Yes
Partial constraints ✅ Yes (per interval) Limited
Polynomial coefficient export ✅ Yes ❌ No

When to use this package vs cobs

⚠️ Performance Notice

This R package is currently intended for demonstration, prototyping, and educational purposes only.

Due to the current implementation (pure R with CVXR), the package is significantly slower than its Python counterpart. Cubic B-spline quantile regression with constraints involves solving SOCP problems, and the R implementation does not yet leverage optimized linear algebra libraries. Python version

Current benchmarking (median regression, n=1000, kn=20, cubic splines):

⚠️ The R version is currently 50-100x slower than Python (estimation)

Future Improvements

We plan to improve performance in future releases by: - Linking with faster optimization libraries (OSQP, Gurobi) - Implementing more efficient SOCP solvers - Optimizing the B-spline basis computation

The Python version remains the recommended choice for production use.

Installation for beta testing:

Install from GitHub

pak::pak(“alexandreabbes/BsplineQuantReg”)

mirror server hosted at Truenetwork, Russian Federation.