getLambdaNcoef {lol}R Documentation

get the lambda value that yield certain number of non-zero coefficients

Description

get the lambda value that yield certain number of non-zero coefficients

Usage

getLambdaNcoef(y, x, lambda1, nCoef, track=FALSE, model='linear', standardize=FALSE)

Arguments

y

A vector of expressions

x

a matrix of CN variables

lambda1

minimum lambda to use

nCoef

the number of coefficients to get

track

logical value for tracking the progress

model

which model to use, default to 'linear'

standardize

standardize the data or not

Value

lambda

The lambda value that gives approximate same number of non-zero coefficients as required

Author(s)

Yinyin Yuan

See Also

lasso

Examples

data(chin07)
data <- list(y=chin07$ge[1,], x=t(chin07$cn))
getLambdaNcoef(data$y, data$x, lambda1=.1, nCoef=10, track=TRUE)

[Package lol version 1.32.0 Index]