prq: Profile Boosting for Quantile Regression

View source: R/prq.R

prqR Documentation

Profile Boosting for Quantile Regression

Description

prq inherits the usage of the function quantreg::rq.

Usage

prq(
  formula,
  tau = 0.5,
  data,
  subset,
  weights,
  na.action,
  method = "br",
  model = TRUE,
  contrasts = NULL,
  ...,
  stopFun = EBIC,
  keep = NULL,
  maxK = NULL,
  verbose = FALSE
)

Arguments

formula

See pboost.

tau

Parameters passed to quantreg::rq.

data

See pboost.

subset

Parameters passed to quantreg::rq.

weights

Parameters passed to quantreg::rq.

na.action

Parameters passed to quantreg::rq.

method

Parameters passed to quantreg::rq.

model

Parameters passed to quantreg::rq.

contrasts

Parameters passed to quantreg::rq.

...

Parameters passed to quantreg::rq.

stopFun

Parameters passed to pboost.

keep

Parameters passed to pboost.

maxK

Parameters passed to pboost.

verbose

Parameters passed to pboost.

Value

An rq model object fitted on the selected features.

Examples

library(quantreg)
set.seed(2025)
n <- 300
p <- 200
x <- matrix(rnorm(n*p), n)

eta <- drop( x[, 1:3] %*% runif(3, 1.0, 1.5) )
y <- eta + (1.0 + x[, 3]) * rnorm(n)
DF <- data.frame(y, x)

tau <- 0.5
prq(y ~ ., tau, DF, verbose=TRUE)

BIC <- function(obj) AIC(obj, k=-1)
prq(y ~ ., tau, DF, stopFun=BIC, verbose=TRUE)

scorerq <- function(object) {
 return(ifelse(object[["y"]] < fitted(object), tau - 1, tau))
}
pboost(y ~ ., DF, rq, scorerq, EBIC, tau=tau, verbose=TRUE)


pboost documentation built on Jan. 9, 2026, 1:07 a.m.