getLambdaNcoef: get the lambda value that yield certain number of non-zero...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/linFit.R

Description

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

Usage

1
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

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

lol documentation built on May 2, 2018, 3:58 a.m.