Learn R Programming

nethet (version 1.4.2)

screen_cvtrunc.lasso: Cross-validated Lasso screening and additional truncation.

Description

Cross-validated Lasso screening and additional truncation.

Usage

screen_cvtrunc.lasso(x, y, k.trunc = 5)

Arguments

x
Predictor matrix.
y
Response vector.
k.trunc
Truncation constant="number of samples per predictor" (default=5).

Value

  • Active-set.

Details

Computes Lasso coefficients (cross-validation optimal lambda). Truncates smallest coefficients to zero, such that there are no more than n/k.trunc non-zero coefficients.

Examples

Run this code
screen_cvtrunc.lasso(matrix(rnorm(5000),50,100),rnorm(50))

Run the code above in your browser using DataLab