kqr {fastkqr}R Documentation

Solve the kernel quantile regression. The solution path is computed at a grid of values of tuning parameter lambda.

Description

Solve the kernel quantile regression. The solution path is computed at a grid of values of tuning parameter lambda.

Usage

kqr(
  x,
  y,
  lambda,
  tau,
  delta = 0.125,
  eps = 1e-05,
  maxit = 1e+06,
  gam = 1e-07,
  sigma = NULL,
  is_exact = FALSE
)

Arguments

x

A numerical input matrix. The dimension is n rows and p columns.

y

Response variable. The length is n.

lambda

A user-supplied lambda sequence.

tau

A user-supplied tau value for a quantile level.

delta

The smoothing index for method='huber'. Default is 0.125.

eps

Stopping criterion.

maxit

Maximum number of iterates.

gam

A small number for numerical stability.

sigma

Kernel bandwidth.

is_exact

Exact or approximated solutions. Default is FALSE.

Details

The function implements an accelerated proximal gradient descent to solve kernel quantile regression.

Value

An object with S3 class kqr

alpha

An n+1 by L matrix of coefficients, where n is the number of observations and L is the number of tuning parameters. The first row of alpha contains the intercepts.

lambda

The lambda sequence that was actually used.

delta

The smoothing index.

npass

The total number of iterates used to train the classifier.

jerr

Warnings and errors; 0 if none.

info

A list includes some settings used to fit this object: eps, maxit

.

Examples

library(MASS)
data(GAGurine)
x <- as.matrix(GAGurine$Age)
y <- GAGurine$GAG
lambda <- 10^(seq(1, -4, length.out=30))
fit <- kqr(x, y, lambda=lambda, tau=0.1, is_exact=TRUE)

[Package fastkqr version 1.0.0 Index]