Interactive 'Shiny' Interface for 'BsplineQuantReg'

A user-friendly interactive Shiny interface for the 'BsplineQuantReg' package, enabling quantile regression using B-splines with shape constraints, based on the method described in Abbes (2025). Almost all parameters of the main function 'quantile_spline()' can be tuned. Features include interactive knot placement, per-region constraint specification, 'CSV' data import, direct demo access, reproducible R code generation, and solver selection. From version 0.2.2 it handles knots multiplicity, Bspline basis visualisation, mean-square regression, pp form visualisation under human readable form, in local or canonical bases, The version 0.2.3 allows regression with spline of any degree, with constraints implemented for degrees 0 to 5. The GUI provides two modes, basic (compatible with 'BsplineQuantReg' >= 0.2.2) and advanced (requires 'BsplineQuantReg' >= 0.2.6 for stable multiplicity features). This GUI is an R (improved) version of the 'Python Tk' version of 'BsplineQuantRegPy'.


BsplineQuantRegGui

CRAN status CRAN downloads R [License: GPL-3]

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. From the version 2.3, the degrees 0 and greater than 5 are also available. It also 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 0 to 4 for constraints, and more than 5), 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 auto nknots, and manual knots with their multiplicities, see the corresponding basis with singularities.
  • control the application of constraints with derivatives.

Installation

From CRAN

install.packages("BsplineQuantRegGui")

From GitHub

install.packages("remotes")
remotes::install_github("alexandreabbes/BsplineQuantRegGui")

Quick Start

library(BsplineQuantRegGui)
# Launch the application
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

# Launch default version (advanced)
docker run -p 3838:3838 ghcr.io/alexandreabbes/bsplinequantreggui:latest

# Launch basic version
docker run -e APP_VERSION="basic" -p 3838:3838 ghcr.io/alexandreabbes/bsplinequantreggui:latest
#APP_VERSION :  either 1 || "basic"" or 2 || "advanced" 

Then open the local adress "127.0.0.1:3838" in your browser (remove the quotes).

Requirements

Core Package

'BsplineQuantReg' >= 0.2.2 (Basic mode) or >= 0.2.6 (All features)

Version Compatibility

GUI Version Core Version Mode Features
0.2.3 >= 0.2.2 Basic Standard regression, constraints
0.2.3 0.2.6 Advanced All features incl. multiplicity

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 generated samples
  • Use the Custom function field to define your own data generator

2. Spline Configuration

  • Select Degree (1 to 4 is standard for constraints, but possible 0 to any)

  • Knots:

    > - 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 almost independant and 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

  • Select the type of regression:quantile ($L^1$ asymmetric absolute value) or mean ($L^2$ quadratic).
  • Set the desired quantile.
  • 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)
  • Equations of the spline in pp-form in a human readable form: (Des)Activate view.
  • Derivatives and check the constraints: (Des)Activate View.
  • 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 output in the console tab.

5. Run Demos

  • Click on any demo to run and visualise it 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 any degree, shape constraints for Degrees 0 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

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("BsplineQuantRegGui")

0.2.3 by Alexandre Abbes, 2 days ago


Browse source code at https://github.com/cran/BsplineQuantRegGui


Authors: Alexandre Abbes [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports BsplineQuantReg, shiny, shinyjs, DT, plotly, png, shinythemes, colourpicker, png.1, ECOSolveR

Suggests cobs, knitr, rmarkdown, shinytest2, testthat


See at CRAN