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. The version 0.2.2 handles knots multiplicity, Bspline basis visualisation, mean-square regression, pp form visualisation under human readable form, in local or canonical bases, The GUI provides two modes, basic (compatible with 'BsplineQuantReg' >= 0.2.2) and advanced (requires 'BsplineQuantReg' >= 0.2.5 for stable multiplicity features). This GUI an 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. 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)
# 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

  • 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

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.2 by Alexandre Abbes, a month 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, testthat


See at CRAN