BsplineQuantRegGui
[
]
Overview
'BsplineQuantRegGui' is an interactive Shiny interface for the 'BsplineQuantReg' package, providing a user-friendly way to perform quantile regression using B-splines with shape constraints.
The package is available on CRAN.
The underlying 'BsplineQuantReg' package provides the core regression methods for B-spline quantile regression with Karlin-Studden polynomial sign characterization, including degrees 1 to 4. It provides a small set of robust functions in pure R for polynomial calculation, piecewise polynomial and B-spline manipulation, including differentiation, B-spline coefficients calculations and transformation to PP-form, evaluation of splines and pp polynomial as functions, and coefficients display in human readable form.
Features
This GUI application makes it easy to:
- Load and visualize data (from multiple data sources: custom function, CSV files)
- Interactive plotting: zoom, pan, and add knots by clicking on the plot
- Configure B-spline parameters (degree 1 to 4), visualise the basis.
- Plot multiple curves with color management
- Apply shape constraints (monotonicity, convexity, third derivative)
- Manage constraints per region interactively
- Run quantile regression with various solvers
- Export reproducible R code
- Run demo presets directly from the interface (according to degree)
- Type of regression : quantile or mean-square (for 'BsplineQuantReg' version >=0.2.3)
- add/remove manual knots and their multiplicity.
- control constraints vith derivatives.
Installation
From CRAN
install.packages("BsplineQuantRegGui")
From GitHub
install.packages("remotes")
remotes::install_github("alexandreabbes/BsplineQuantRegGui")
Quick Start
library(BsplineQuantRegGui)
runGui()
The GUI will open in your default web browser.
Docker Deployment
A Docker image is available for easy deployment:
docker pull ghcr.io/alexandreabbes/bsplinequantreggui:latest
docker run -p 3838:3838 ghcr.io/alexandreabbes/bsplinequantreggui:latest
docker run -e APP_VERSION="basic" -p 3838:3838 ghcr.io/alexandreabbes/bsplinequantreggui:latest
Then open the local adress "127.0.0.1:3838" in your browser (remove the quotes).
Requirements
Core Package
-
Minimum version: 'BsplineQuantReg' >= 0.2.2 (Basic mode)
-
Recommended version: 'BsplineQuantReg' >= 0.2.5 (All features)
Version Compatibility
| GUI Version |
Core Version |
Mode |
Features |
| v0.2.2 |
>= 0.2.2 |
Basic |
Standard regression, constraints |
| v0.2.2 |
>= 0.2.5 |
Advanced |
All features incl. multiplicity |
This package depends on:
| Package |
Purpose |
| 'BsplineQuantReg' (>= 0.2.5) |
Core regression functions |
| 'shiny' |
Interactive web framework |
| 'plotly' |
Interactive graphics |
| 'DT' |
Interactive tables |
| 'shinythemes' |
UI themes |
| 'shinyjs' |
Enhanced JavaScript capabilities |
| 'colourpicker' |
Color selection widget |
| 'ECOSolveR' |
A good solver that causes no problem to compile |
Usage Guide
1. Data Selection
- Click Test to generate sample data
- Click Temp to load the global temperature dataset (1880-1992)
- Click CSV to import your own data file
- Adjust x range field, the number n of geerated samples
- Use the Custom function field to define your own data generator
2. Spline Configuration
- Select Degree (1 to 4)
- Adjust Auto knots count (placed as quantiles of knots)
- Click Add knot to enter manual knot placement mode, then click on the plot. The two lists of knots auto and manual are joined.
- Click Clear knots to clear manual knots
- Click on a knot to select it, click on "remove knot" to remove it.
3.Knots multiplicity
-select or un-select "consider multiplicity"" -click on a knot to select it -adjust multiplicity with + or -. Multiplicity of a knot is limited to degree+1
3b. View basis
- go to the basis tab
- select or un-select "consider multiplicity"
- Chose a derivative level
- Check the knots and their multiplicities
- click "update basis" to view the Bspline Basis.
4. Constraints
- Choose Uniform constraints to apply the same constraint everywhere
- Choose Per region to define different constraints in specific regions
- Click Select to enter region selection mode
- Drag a rectangle on the plot to define the region
- Adjust monotonicity, convexity, and third derivative constraints
- Click Add region to apply the constraint
- View/remove all active region constraints in the Regions tab
4. Run Analysis
- Click Run to execute the regression with your chosen solver and type of regression ('BsplineQuantReg' >= '0.2.3')
- View results: the curve and the Information. Coefficients (on the B-spline Basis)
- View equations of the spline ij pp form in a human readable form
- View derivatives and check the constraints
- View verbose output in the Console tab if verbose = TRUE is selected
- Informations: Degree, tau, constraints, knots and coefficients
- Data: Summary and table of the data
4b Reproduce analysis by your own
- R Code tab: Generated code to reproduce the analysis
4c Check output in console
- select "verbose" to print verbose aoutput in the console tab.
5. Run Demos
- Click on any demo to run it, and visualise in the demo tab. The degree of the spline is that selected in the GUI.
Citation
citation("BsplineQuantRegGui")
If you use this package in your research, please cite:
@Article{Abbes2025, author = {Alexandre Abbes}, title = {Quantile Regression with Cubic Polynomial Splines under Shape Constraints with Applications}, year = {2025}, doi = {10.5281/zenodo.17427913} }
@Manual{Abbes2026R, author = {Alexandre Abbes}, title = {BsplineQuantReg: Quantile Regression with B-Splines of Degrees 1 to 4}, year = {2026}, note = {R package version 0.2.0}, url = {https://cran.r-project.org/package=BsplineQuantReg} }
License
GPL-3 (c) Alexandre Abbes (2026)
References