global_rq function

Global quantile regression

Global quantile regression

Global tests of significance for the effect of covariates in quantile regression

global_rq( nsim, formula.full, formula.reduced, taus, data, contrasts = NULL, permutationstrategy = c("Freedman-Lane", "Freedman-Lane+remove zeros", "within nuisance", "remove location", "remove location scale", "remove quantile"), savefuns = FALSE, rq.args = NULL, lm.args = NULL, GET.args = NULL, mc.cores = 1L, mc.args = NULL, cl = NULL )

Arguments

  • nsim: The number of random permutations.
  • formula.full: The formula specifying the general linear model, see formula in lm.
  • formula.reduced: The formula of the reduced model with nuisance factors only. This model should be nested within the full model.
  • taus: The quantiles to be used.
  • data: data.frame where to look for variables.
  • contrasts: Passed directly to rq.
  • permutationstrategy: The permutation strategy to be used. See details.
  • savefuns: Logical. If TRUE, then the functions from permutations are saved to the attribute simfuns.
  • rq.args: Additional arguments passed to rq.
  • lm.args: A named list of additional arguments to be passed to lm. See details.
  • GET.args: A named list of additional arguments to be passed to global_envelope_test, e.g. typeone specifies the type of multiple testing control, FWER or FDR. See global_envelope_test for the defaults and available options.
  • mc.cores: The number of cores to use, i.e. at most how many child processes will be run simultaneously. Must be at least one, and parallelization requires at least two cores. On a Windows computer mc.cores must be 1 (no parallelization). For details, see mclapply, for which the argument is passed. Parallelization can be used in generating simulations and in calculating the second stage tests.
  • mc.args: A named list of additional arguments to be passed to mclapply. Only relevant if mc.cores is more than 1.
  • cl: Allows parallelization through the use of parLapply (works also in Windows), see the argument cl there, and examples.

Returns

A global_envelope or combined_global_envelope object, which can be printed and plotted directly.

Details

The possible permutation strategies include "Freedman-Lane" (FL), "Freedman-Lane+remove zeros" (FL+), "within nuisance" (WN), "remove location" (RL), "remove location scale" (RLS), "remove quantile" (RQ), which correspond to those in Mrkvička et al. (Section 4.1-4.6 and Table 1).

Examples

if(require("quantreg", quietly=TRUE)) { data("stackloss") res <- global_rq(nsim = 19, # Increase nsim for serious analysis! formula.full = stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., formula.reduced = stack.loss ~ Water.Temp, taus = seq(0.1, 0.9, length=10), permutationstrategy = "remove quantile", data = stackloss, GET.args = list(typeone = "fwer")) plot(res) }

References

Mrkvička, T., Konstantinou, K., Kuronen, M. and Myllymäki, M. (2023) Global quantile regression. arXiv:2309.04746 [stat.ME]. https://doi.org/10.48550/arXiv.2309.04746

Myllymäki, M. and Mrkvička, T. (2024). GET: Global envelopes in R. Journal of Statistical Software 111(3), 1-40. doi: 10.18637/jss.v111.i03

Freedman, D., & Lane, D. (1983) A nonstochastic interpretation of reported significance levels. Journal of Business & Economic Statistics, 1(4), 292-298. doi:10.2307/1391660

  • Maintainer: Mari Myllymäki
  • License: GPL-3
  • Last published: 2025-03-30