ranklassopath: ranklassopath

View source: R/regression_ranklassopath.R

ranklassopathR Documentation

ranklassopath

Description

ranklassopath computes the rank LAD-Lasso regularization path (over grid of penalty parameter values). Uses IRWLS algorithm.

Usage

ranklassopath(y, X, L = 120, eps = 0.001, reltol = 1e-07,
  printitn = F)

Arguments

y:

Numeric data vector of size N (output, respones)

X:

Numeric data matrix of size N x p. Each row represents one observation, and each column represents one predictor (feature).

L:

Positive integer, the number of lambda values on the grid to be used. The default is L=120.

eps:

Positive scalar, the ratio of the smallest to the largest Lambda value in the grid. Default is eps = 10^-3.

reltol:

Convergence threshold for IRWLS. Terminate when successive estimates differ in L2 norm by a rel. amount less than reltol.

printitn:

print iteration number (default = F, no printing)

Value

B: Fitted RLAD-Lasso regression coefficients, a p-by-(L+1) matrix, where p is the number of predictors (columns) in X, and L is the number of Lambda values.

B0: estimates values of intercepts

stats: structure with following fields: Lambda = lambda parameters in ascending order GMeAD = Mean Absolute Deviation (MeAD) of the residuals gBIC = generalized Bayesian information criterion (gBIC) value for each lambda parameter on the grid.

Note

File location : regression_ranklassopath.R

Examples

data('prostate')

X <- prostate$X
y <- c(prostate$y)

namess <- unlist(prostate$names)

n <- nrow(X)
p <- ncol(X)

Xone <- cbind(rep(1,n), X)
LSE <- qr.solve(Xone, y) # Least squares estimate

GRlen <- 120

yout <- y
yout[1] <- yout[1] + 55
ranklassopath(yout, X)

Mufabo/Rrobustsp documentation built on June 11, 2022, 10:41 p.m.