| prq | R Documentation |
prq inherits the usage of the function quantreg::rq.
prq(
formula,
tau = 0.5,
data,
subset,
weights,
na.action,
method = "br",
model = TRUE,
contrasts = NULL,
...,
stopFun = EBIC,
keep = NULL,
maxK = NULL,
verbose = FALSE
)
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. |
An rq model object fitted on the selected features.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.