| 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
)
prq.fit(
x,
y,
tau = 0.5,
method = "br",
...,
stopFun = "EBIC",
keep = NULL,
maxK = NULL,
verbose = TRUE
)
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. |
A rq model object fitted on the selected features.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.