Permutation Test for Weighted Quantile Sum Regression
Overview
Implements a permutation test method for the weighted quantile sum (WQS) regression, building off the 'gWQS' package (Renzetti et al. https://CRAN.R-project.org/package=gWQS). Weighted quantile sum regression is a statistical technique to evaluate the effect of complex exposure mixtures on an outcome (Carrico et al. 2015 doi:10.1007/s13253-014-0180-3). The model features a statistical power and Type I error (i.e., false positive) rate trade-off, as there is a machine learning step to determine the weights that optimize the linear model fit. This package provides an alternative method based on a permutation test that should reliably allow for both high power and low false positive rate when utilizing WQS regression (Day et al. 2022 doi:10.1289/EHP10570).
- This function previously did not accommodate tibbles for the
dataargument
of wqs_full_perm, but now data can be a data.frame object or a tibble.
- Added a
utils.Rscript with a functionget_legend2()to replace the
malfunctioning cowplot::get_legend() call in the function wqspt_plot. In
cowplot v1.1.3, get_legend() returns an error if the legend position is
anywhere besides on the right of the plot. Since wqspt_plot extracts a legend
positioned on the bottom of a plot to be included in the plot output if
InclKey = TRUE, this was previously throwing an error.
- Added a
gwqs_hpcfunction toutils.Ralong with its necessary hidden
functions imported from the gWQS package to add an option to specify a
number of workers for parallel processes for wqs_pt and wqs_full_perm. The
gwqs function in the gWQS package (v3.0.5) uses as many parallel processes
Show all changes in 1.0.2Hide the rest of the changes in 1.0.2
as there are cores detected, which can be problematic with high-performance
computing (HPC) environments. HPC schedulers allocate a specific number of
cores, and if gwqs tries to use more than that number, it will terminate the
HPC job. Therefore, gwqs_hpc was created to allow for the number of parallel
processes to be specified, thereby avoiding this problem.
- Added
...arguments towqs_ptandwqs_full_permthat ensure that the
additional arguments passed to gwqs_hpc are passed to every iteration of that
function, whereas previously those additional arguments only passed to the
main WQS regression in wqs_full_perm.
- Added the arguments
LegendWidthInandLegendHeightIntowqspt_plotto
control the bottom legend width and height, respectively.
- Added some examples to the documentation for
wqspt_plotto better illustrate
its use.
- Replaced all
b1_constrarguments withb_constrto match the change in the
name of this argument in the latest version of the gWQS package (v3.0.5).
- Replaced URL links to referenced papers with doi.org links.
- Added additional examples of papers using the WQSPT method.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 4
- Examples that run
- 75%3 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 25%
Downloads
Dependencies
Installing wqspt adds 116 packages (61 with compiled code, 102 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
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
- 1.0.2Latest
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.12023-03-06
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2023-03-06
- Total releases
- 2 / 3 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 4.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("wqspt")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.