Skip to content

wqspt

1.0.2Package record

Permutation Test for Weighted Quantile Sum Regression

0packages depend
2.2Kdownloads / year
–test coverage
13/13flavors OK

Overview

About
Maintained by Drew DayCRAN page ↗

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).

Changes in 1.0.2
  • This function previously did not accommodate tibbles for the data argument

of wqs_full_perm, but now data can be a data.frame object or a tibble.

  • Added a utils.R script with a function get_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_hpc function to utils.R along 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 to wqs_pt and wqs_full_perm that 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 LegendWidthIn and LegendHeightIn to wqspt_plot to

control the bottom legend width and height, respectively.

  • Added some examples to the documentation for wqspt_plot to better illustrate

its use.

  • Replaced all b1_constr arguments with b_constr to 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

CRAN checks
13OK
Slowest check: 5.5 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.0.2
READMEYes · 277 wordsVignettesYes · 1 · dynamicNEWSYes · 67% structured · mentions 1.0.2Citation fileNoWebsitenot declared in DESCRIPTION
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

2.2K
CRAN downloads in the past year
Rank #19,599 · ~6/day · ~183/mo
Daily download trend is not available in this view yet.
27830 days
67790 days
2.2K1 year
Compare downloads with other packages →
Also on64 r2u1 autocran

Dependencies

Declared dependencies
16 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (3)
Author, Maintainer since 1.0.1 (2023)
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 1.0.2Latest
    record
    2025-03-05 · current release · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.1
    record
    2023-03-06
  • R
    R 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")
Day, D., Peng, J., & Szpiro, A. (2025). wqspt: Permutation Test for Weighted Quantile Sum Regression (Version 1.0.2) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for wqspt version 1.0.2 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy