Smooth Additive Quantile Regression Models
Overview
Smooth additive quantile regression models, fitted using the methods of Fasiolo et al. (2020) doi:10.1080/01621459.2020.1725521. See Fasiolo at al. (2021) doi:10.18637/jss.v100.i09 for an introduction to the package. Differently from 'quantreg', the smoothing parameters are estimated automatically by marginal loss minimization, while the regression coefficients are estimated using either PIRLS or Newton algorithm. The learning rate is determined so that the Bayesian credible intervals of the estimated effects have approximately the correct coverage. The main function is qgam() which is similar to gam() in 'mgcv', but fits non-parametric quantile regression models.
Install
Health
ERRORtestsr-devel-windows-x86_64
Running 'testthat.R' [112s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(qgam)
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.9-4. For overview type '?mgcv'.
>
> test_check("qgam")
Saving _problems/test-calFastTuneLearn-98.R
Saving _problems/test-calFastTuneLearn-102.R
Saving _problems/test-calFastTuneLearnFast-80.R
Saving _problems/test-calFastTuneLearnFast-87.R
Saving _problems/test-qgam_discrete-72.R
Saving _problems/test-qgam_discrete-77.R
[ FAIL 6 | WARN 6 | SKIP 3 | PASS 1 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• empty test (3): , ,
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-calFastTuneLearn.R:83:5'): calFastTuneLearn ──────────────────
`{ ... }` threw an error.
Message: lazy-load database 'D:/temp/2026_10_19_01_50_00_32085/RtmpOk95eS/RLIBS_5c3406fe02473/mg
...[truncated]...
on
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-qgam_discrete.R:61:5
2. │ └─testthat:::quasi_capture(...)
3. │ ├─testthat (local) .capture(...)
4. │ │ └─base::withCallingHandlers(...)
5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
6. └─base::lapply(...) at test-qgam_discrete.R:64:9
7. └─qgam (local) FUN(X[[i]], ...)
8. └─qgam::qgam(...) at test-qgam_discrete.R:66:35
9. └─qgam::tuneLearnFast(...)
10. └─mgcv::predict.gam(mObj, newdata = data, type = "lpmatrix")
── Error ('test-qgam_discrete.R:77:5'): qgam_discrete ──────────────────────────
<subscriptOutOfBoundsError/error/condition>
Error in `tmp[, 3 + 1]`: subscript out of bounds
Backtrace:
▆
1. ├─base::plot(...) at test-qgam_discrete.R:77:5
2. └─graphics::plot.default(...)
3. └─grDevices::xy.coords(x, y, xlabel, ylabel, log)
[ FAIL 6 | WARN 6 | SKIP 3 | PASS 1 ]
Error:
! Test failures.
Execution halted- ERROR12 OK, 1 ERROR2026-10-20
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 18
- Examples that run
- 83%15 run in a plain check · 3 never run
- Exported functions with examples
- 100%
- Documented parameters
- not tracked
- Return-value docs
- not tracked
- Help pages citing references
- 61%
Downloads
Dependencies
Installing qgam adds 34 packages (20 with compiled code, 26 MB of source tarballs). Heaviest: bslib 5.6 MB, promises 3.1 MB, sass 2.9 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 2.0.0Latest
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 1.3.42021-11-22 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.3.32021-04-27 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.3.22020-02-03 · diff ↗
- 1.3.12020-02-01 · diff ↗
- 1.3.02019-06-07 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.2.32019-01-24 · diff ↗
- 1.2.22018-05-29 · diff ↗
Package metadata
- First published
- 2017-08-29
- Total releases
- 10 / 9 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 4.0
- Bundled data
- 374 KB / 2 files
- Download size
- 3.9 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("qgam")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v100.i09.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.