robHD: Robust joint estimator.

Description Usage Arguments Details Value Examples

Description

This is a function to compute the regression coefficients for robust penalized regression. The exponential squared loss function is used to provide the robustness, and penalization is employed to enforce the sparsity of estimators.

Usage

1
2
3
robHD(x, y, delta, n_lambda = 20, lambda0 = -1, kappa = 1/3, theta,
  eps = 1e-05, max.iter = 100, max.cd = 5, penalty = "MCP",
  init = NaN)

Arguments

x

explanotory variable matrix of size n * p.

y

response variable vector of length n. y is the logarithm of the observed event/censoring time.

delta

censoring indicator vector of length n. delta equals 1 meaning event and 0 meaning failure.

n_lambda

number of tuning parameters λ to use in the penalized regression. Default is 20.

lambda0

The user-specified largest value for tuning parameter λ. The default will be the λ such that all regression coefficients equal zero.

kappa

Tuning parameter in the MCP penalty. kappa ranges from 0 to 1, where 0 corresponds to Lasso penalty, and 1 corresponds to the hard threshold penalty.

theta

Vector of robust tuning parameters. theta takes positive values. Small theta downweighs the influence of outliers. Hence, the smaller theta is, the more robust the estimators are.

eps

Convergence threshold. The algorithm iterates until the change in any coefficient is less than eps. Default is 1e-5.

max.iter

The maximum number of outer layer iterations. Default is 100.

max.cd

The maximum number of inner layer iterations for the coordinate descent algorithm. Default is 5.

penalty

Penalty function. Values could be "LASSO" or "MCP". Default is "MCP".

init

User specified initial values for regression coefficients. If not specified, default value is a length p vector of zeros.

Details

The sequence of models indexed by the regularization parameter lambda is fit using a coordinate descent algorithm. The loss function is

ω exp(-(y - xβ) ^ 2/(2θ)) - λ|β|_1,

where the first term is the exponential squared loss, and the second term is the Lasso penalty. ω is the Kaplan-Meier weight. To find the maximizer of the loss function, an two-layer MM coordinate descent (MMCD) algorithm is used. The outer layer of the MMCD algorithm is an MM algorithm, in which the exponential term is approximated by a weighted least square. The main contribution of this layer is that it uses the minorization technique to solve the maximization problem using relatively simple approximations in an iterative manner. The inner layer of the MMCD algorithm contains a coordinate descent algorithm. The goal is to find a good enough solution to the minorized penalized regression problem. Because the original loss function is approximated iteratively, it might require a huge amount of time to compute the solution if each inner layer achieves convergence. As a result, the default maximum number of inner iterations is three.

The sequence of tuning parameters λ is generated based on the largest value of lambda0 and the number of λ n_lambda. The minimum of λ equals lambda0 * 0.001, if p<n, and equals lambda0* 0.05, if p>=n.

Value

An object with S3 class "robint" containing:

betalasso

The matrix of regression coefficients using Lasso penalty. The size of the matrix is p * (n_lambda * n_theta), where n_theta is the number of thetas. The first n_lambda columns correspond to estimators from theta[1]. The next n_lambda columns correspond to estimators from theta[2], so on and so forth.

betamcp

The matrix of regression coefficients using MCP penalty. The size of the matrix is p * (n_lambda * n_theta), where n_theta is the number of thetas. The first n_lambda columns correspond to estimators from theta[1]. The next n_lambda columns correspond to estimators from theta[2], so on and so forth.

iter

Vector of length n_lambda * n_theta for number of iterations in the MM algorithm for the corresponding tuning parameters. The order of tuning parameters is the same as in betalasso.

lambda

The vector of λ.

kappa

Tuning parameter in the MCP penalty.

theta

The vector of robust tuning paramether.

omega

The vector of Kaplan-Meier weights for each sample.

Examples

1
2
3
4
5
x = matrix(rnorm(20000), nrow = 100)
b = c(0.5, 1, -1, 2, -0.5, rep(0, 195))
y = crossprod(t(x), b) + rnorm(100, 0, 1)
delta = rbinom(100, 1, .7)
robHD(x, y, delta, theta = c(10, 20))

shuanggema/robHD documentation built on May 29, 2019, 9:26 p.m.