sssvcqr implements sparse-smooth spatially varying coefficient quantile
regression (SS-SVCQR). The model decomposes each candidate spatial coefficient
into a global baseline and a location-specific deviation, selects global versus
local effects with a group penalty, and smooths local deviations with a graph
Laplacian over observed spatial locations.
This package is an initial research-software version of the code used for the paper Sparse-Smooth Spatially Varying Coefficient Quantile Regression.
From the package directory:
R CMD INSTALL .
Or from the extend/ directory:
R CMD INSTALL sssvcqr
From GitHub:
install.packages("remotes")
# remotes::install_github("Stork343/sssvcqr")
install.packages("sssvcqr", repos = c('https://stork343.r-universe.dev', 'https://cloud.r-project.org'))
library(sssvcqr)
dat <- simulate_sssvcqr_data(n = 120, q = 2, p = 3, seed = 1)
dat$active
fit <- ss_svcqr(
y = dat$y,
Z = dat$Z,
X = dat$X,
u = dat$u,
tau = 0.5,
lambda1 = 5,
lambda2 = 0.1,
k_nn = 8,
control = list(max_iter = 180, warn_nonconvergence = FALSE)
)
fit
summary(fit)
selection_recovery_table(fit, dat)
head(predict(fit))
Spatially blocked cross-validation:
cv <- cv_ss_svcqr(
y = dat$y,
Z = dat$Z,
X = dat$X,
u = dat$u,
tau = 0.5,
lambda1_seq = c(1, 2),
lambda2_seq = c(0.5, 1),
K_folds = 3,
control = list(max_iter = 50, warn_nonconvergence = FALSE)
)
cv$best
ss_svcqr(): fit SS-SVCQR by ADMM.predict.sssvcqr(): predict fitted quantiles at training or new locations.cv_ss_svcqr(): tune penalties by spatially blocked cross-validation.build_graph_laplacian(): construct a weighted k-nearest-neighbor graph and Laplacian.simulate_sssvcqr_data(): generate synthetic examples for testing and tutorials.selection_recovery_table(): compare true and estimated deviation-field selection in synthetic examples.kkt_sssvcqr(): compute first-order diagnostic quantities for a fitted model.sssvcqr is intended for users who need all three of the following in one
workflow:
Related R workflows cover adjacent tasks. quantreg provides global quantile
regression, GWmodel provides geographically weighted mean-regression tools,
qgam provides additive quantile GAMs, and mgcv provides a broad smooth
modeling framework. These packages are mature and should be preferred when
their model class matches the analysis goal. sssvcqr fills a narrower gap:
graph-smoothed local coefficient deviations with group-sparse selection under
quantile loss.
This package is in an initially stable research-software state. The exported API is small, documented, and covered by unit and numerical tests, but future releases may add a formula interface, compiled linear algebra kernels, uncertainty summaries, and grid-prediction helpers in response to reviewer and user feedback.
This is a research-software package prepared for journal submission. The public
repository is available at https://github.com/Stork343/sssvcqr. The current
local submission candidate declares package version 0.0.3. The previous
public archive is release v0.0.2 with Zenodo DOI
https://doi.org/10.5281/zenodo.20048828; that archive does not include the
latest local submission-candidate changes. A new GitHub release and Zenodo DOI
should be created after final review. The repository includes a GitHub Actions
R CMD check workflow, package vignettes, root-level replication materials, a
JOSS paper draft, and a small Lucas County example data set.
If you use sssvcqr in published work, please cite the methodological
article:
Hou, J., Meng, T., Tian, M., Pan, J., & Härdle, W. K. (2026). Sparse-smooth spatially varying coefficient quantile regression. Spatial Statistics, 74, 100983. https://doi.org/10.1016/j.spasta.2026.100983
and the software package:
Hou, J., Meng, T., Tian, M., Pan, J., & Härdle, W. K. (2026). sssvcqr: Sparse-Smooth Spatially Varying Coefficient Quantile Regression. R package version 0.0.5. https://github.com/Stork343/sssvcqr
Run citation("sssvcqr") for the canonical package citation entries.