Learn R Programming

lol (version 1.20.0)

lasso.cv: Cross validation optimizer for lasso

Description

Cross validation lasso. This function optimizes the lasso solution for correlated regulators by an algorithm. this algorithm chooses the minimum lambda since the penalized package by default use 0 for the minimum, which sometimes take a long time to compute

Usage

lasso.cv(y, x=NULL, lambda1=NULL, model='linear', steps=15, minsteps=5, log=TRUE, track=FALSE, standardize= FALSE, unpenalized=~0, nFold=10, nMaxiter = Inf, ...)

Arguments

y
A vector of gene expression of a probe, or a list object if x is NULL. In the latter case y should a list of two components y and x, y is a vector of expression and x is a matrix containing copy number variables
x
Either a matrix containing CN variables or NULL
lambda1
minimum lambda to use
model
which model to use, one of "cox", "logistic", "linear", or "poisson". Default to 'linear'
steps
parameter to be passed to penalized
minsteps
parameter to be passed to penalized
log
parameter to be passed to penalized
track
parameter to be passed to penalized
standardize
parameter to be passed to penalized
unpenalized
parameter to be passed to penalized
nFold
parameter to be passed to penalized
nMaxiter
parameter to be passed to penalized
...
other parameter to be passed to penalized

Value

A list object of class 'lol', consisting of:
fit
The final sparse regression fit
beta
the coefficients, non-zero ones are significant
lambda
the penalty parameter lambda used
residuals
regression residuals
conv
logical value indicating whether the optimization has converged

References

Goeman, J. J. (2009), L1 penalized estimation in the cox proportional hazards model, Biometrical Journal.

See Also

lasso

Examples

Run this code
data(chin07)
data <- list(y=chin07$ge[1,], x=t(chin07$cn), nFold=5)
res <- lasso.cv(data)
res

Run the code above in your browser using DataLab