nckqr {fastkqr}R Documentation

Solve the non-crossing kernel quantile regression

Description

Trains the kernel quantile regression

Usage

nckqr(
  x,
  y,
  lambda1,
  lambda2,
  tau,
  delta = 0.125,
  eps = 1e-08,
  maxit = 5e+06,
  gam = 1e-07,
  sigma = NULL,
  kernel = "rbfdot",
  is_exact = FALSE
)

Arguments

x

A numerical input matrix. The dimension is n+1n+1 by ntauntau by L1L1 by L2L2.

y

Response variable. The length is nn.

lambda1

A user-supplied lambda1 sequence. The length is L1L1.

lambda2

A user-supplied lambda2 sequence. The length is L2L2.

tau

A user-supplied tau sequence for quantile levels. The length is ntauntau.

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.

kernel

Name of kernel function. Default is "Gaussian".

is_exact

Exact or approximated solutions.

Details

The function implements the majorization-minimization method to solve non-crossing kernel quantile regression.

Value

An object with S3 class nckqr

alpha

An n+1n+1 by LL matrix of coefficients, where nn represents the number of observations, ntauntau represents the number of quantile levels, and LL denotes the number of tuning parameters.

tau

The tau sequence that was actually used.

lambda1

The lambda1 sequence that was actually used.

lambda2

The lambda2 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)
lambda2 <- 1e-4
tau <- c(0.1, 0.3, 0.5, 0.7, 0.9)
lambda1 <- 10^seq(-8, 2, length.out=10)
data(GAGurine)
x <- as.matrix(GAGurine$Age)
y <- GAGurine$GAG
fit <- nckqr(x ,y, lambda1 = lambda1 , lambda2 = lambda2, tau = tau)

[Package fastkqr version 1.0.0 Index]