MyNixOS website logo
Description

Penalized Quantile Regression.

Performs penalized quantile regression with LASSO, elastic net, SCAD and MCP penalty functions including group penalties. In addition, offers a group penalty that provides consistent variable selection across quantiles. Provides a function that automatically generates lambdas and evaluates different models with cross validation or BIC, including a large p version of BIC. Below URL provides a link to a work in progress vignette.

rqPen: Penalized quantile regression

Overview

This R package provides tools for estimating a quantile regression model with a penalized objective function. Implements a variety of penalties, including group penalties.

Installation

For most up to date versions use the following code. However, be warned the github package is often in a state of testing and debugging.

devtools::install_github("bssherwood/rqpen")

Example

library(rqPen)
n<- 200
p<- 30
x0<- matrix(rnorm(n*p),n,p)
X<- cbind(x0, x0^2, x0^3)[,order(rep(1:p,3))]
y<- -2+X[,1]+0.5*X[,2]-X[,3]-0.5*X[,7]+X[,8]-0.2*X[,9]+rt(n,2)
group<- rep(1:p, each=3)

# lasso estimation
# one tau
fit1 <- rq.pen(x,y)
# several values of tau
fit2 <- rq.pen(x,y,tau=c(.2,.5,.8))

# Group SCAD estimation
fit3 <- rq.group.pen(x,y,groups=group,penalty="gSCAD")

# cross validation
cv1 <- rq.pen.cv(x,y)
plot(cv1)

cv2 <- rq.pen.cv(x,y,tau=c(.2,.5,.8))
plot(cv2)

cv3 <- rq.group.pen(x,y,groups=group,penalty="gSCAD")
plot(cv3)

# BIC selection of tuning parameters
qs1 <- qic.select(fit1)
qs2 <- qic.select(fit2)
qs3 <- qic.select(fit3)

See, https://github.com/bssherwood/rqpen/blob/master/ignore/rqPenArticle.pdf, for a vignette. The Huber approach for rq.pen relies on the R package hqreg and work presented in "Semismooth Newton Coordinate Descent Algorithm for Elastic-Net Penalized Huber Loss Regression and Quantile Regression". The Huber approach in rq.group.pen relies on R package hrqglas and work presented in An Efficient Approach to Feature Selection and Estimation for Quantile Regression with Grouped Variables

References

Sherwood, B. and Li, S. (2022) An Efficient Approach to Feature Selection and Estimation for Quantile Regression with Grouped Variables, Statistics and computing, 75.

Yi, C. and Huang, J. (2015) Semismooth Newton Coordinate Descent Algorithm for Elastic-Net Penalized Huber Loss Regression and Quantile Regression, Journal of Computational and Graphical Statistics, 26:3, 547-557.

Metadata

Version

4.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows