prq: Profile Boosting for Quantile Regression Models

View source: R/prq.R

prqR Documentation

Profile Boosting for Quantile Regression Models

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
)

prq.fit(
  x,
  y,
  tau = 0.5,
  method = "br",
  ...,
  stopFun = "EBIC",
  keep = NULL,
  maxK = NULL,
  verbose = TRUE
)

Arguments

formula

Parameter passed to quantreg::rq.

tau

Parameter passed to quantreg::rq.

data

Parameter passed to quantreg::rq.

subset

Parameter passed to quantreg::rq.

weights

Parameter passed to quantreg::rq.

na.action

Parameter passed to quantreg::rq.

method

Parameter passed to quantreg::rq or quantreg::rq.fit.

model

Parameter passed to quantreg::rq.

contrasts

Parameter passed to quantreg::rq.

...

Parameters passed to quantreg::rq or quantreg::rq.fit.

stopFun

Parameter passed to pboost.

keep

Parameter passed to pboost.

maxK

Parameter passed to pboost.

verbose

Parameter passed to pboost.

x

Parameter passed to quantreg::rq.fit.

y

Parameter passed to quantreg::rq.fit.

Value

A rq model object fitted on the selected features.

Examples

library(quantreg)
set.seed(2026)
n <- 300
p <- 20
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)
frq(y ~ ., tau, DF, stopFun=BIC, verbose=TRUE)

scoreFun <- function(object)
   return(ifelse(object[["y"]] < fitted(object), tau - 1, tau))

pboost(x, y, rq, scoreFun, BIC, tau=tau, verbose=TRUE)

prq.fit(x, y, verbose=TRUE)
frq.fit(x, y, verbose=TRUE)


pboost documentation built on May 24, 2026, 9:08 a.m.