Displaying 20 results from an estimated 7000 matches similar to: "Question about the lars package"
2011 May 24
1
seeking help on using LARS package
Hi,
I am writing to seek some guidance regarding using Lasso regression with the
R package LARS. I have introductory statistics background but I am trying to
learn more. Right now I am trying to duplicate the results in a paper for
shRNA prediction "An accurate and interpretable model for siRNA efficacy
prediction, Jean-Philippe Vert et. al, Bioinformatics" for a Bioinformatics
project
2012 Mar 21
1
glmnet() vs. lars()
dear all,
It appears that glmnet(), when "selecting" the covariates entering the
model, skips from K covariates, say, to K+2 or K+3. Thus 2 or 3
variables are "added" at the same time and it is not possible to obtain
a ranking of the covariates according to their importance in the model.
On the other hand lars() "adds" the covariates one at a time.
My question
2011 May 24
1
anyone using LARS package in R
Hi useR's,
Has anyone used the "Lars" package in R before? If so, is there any tutorial
(not manual) or worked out example online for this R package that one can go
through to figure out how one can use this package with lasso regression?
I appreciate any help I can get in this direction.
Sincerely,
Vishal
--
*Vishal Thapar, Ph.D.*
*Scientific informatics Analyst
Cold Spring
2011 Jun 06
1
Lasso for k-subset regression
Dear R-users
I'm trying to use lasso in lars package for subset regression, I have a
large matrix of size 1000x100 and my aim is to select a subset k of the 100
variables.
Is there any way in lars to fix the number k (i.e. to select the best 10
variables)
library(lars)
aa=lars(X,Y,type="lasso",max.steps=200)
plot(aa,plottype="Cp")
aa$RSS
which.min(aa$RSS)
2010 Nov 05
1
Problem with 'lars' package
Hello,
I have problems with 'lars' package. I found the previous post of the person
who had the same issue, but the suggested solution in that post did not help
me.
I created the matrices:
ResponseMatrix <- data.frame (GAOdecision=GAOdecision)
PredictorsMatrix <- data.frame (WeaponvsNon = WeaponvsNon, ProductvsService
= ProductvsService, KDuration = KDuration, BusinessSize =
2012 Jul 12
1
lars package to do lasso
Dear all
I am using lars package to do lasso in R. I dont undesrtand what max.steps do?and how I can understand from the outputs to obtain the last steps in this packagethanks for your helpbest
[[alternative HTML version deleted]]
2009 Mar 17
1
- help - predicting with glmnet/lars for dataframes with different nrow then the train set
Hello
I'm having trouble using lars and glmnet functions to predict on a new data
set with different nrow then the original :
for instance:
=============
log.1 = glm(temp.data$TL~(.),temp.data,family = binomial,x=TRUE,y=TRUE)
nrow(test.data) != nrow(temp.data # == TRUE
Val.frame = model.frame(log.1,test.data) # returns a data frame with the
variables needed to use log.1
2010 Dec 06
2
How to get lasso fit coefficient(given penalty tuning parameter \lambda) using lars package
Hi, all,
I am using the lars package for lasso estimate. So I get a lasso
fit first:
lassofit = lars(x,y,type ="lasso",normalize=T, intercept=T)
Then I want to get coefficient with respect to a certain value of \lambda
(the tuning parameter), I know lars has three mode options c("step",
"fraction", "norm"), but can I use the \lambda value instead
2007 Aug 02
2
lasso/lars error
I'm having the exact problem outlined in a previous post from 2005 -
unfortunately the post was never answered:
http://tolstoy.newcastle.edu.au/R/help/05/10/15055.html
When running:
lm2=lars(x2,y,type="lasso",use.Gram=F)
I get an error:
Error in if (zmin < gamhat) { : missing value where TRUE/FALSE needed
...when running lasso via lars() on a 67x3795 set of predictors. I
2007 Sep 19
1
Strange behaviour of lars method
Hi!
When I apply the lars (least-angle-regression) method to my data
(3655 features, only 355 data points, no I did not mistype), I
observe a strange behaviour:
1) The beta values tend to grow into real high values quite fast up
to a point where they overflow and get negative. The overflow is not
a problem, I don't need the last part of the analysis anyway, but why
do they just
2013 Jul 17
1
glmnet on Autopilot
Dear List,
I'm running simulations using the glmnet package. I need to use an
'automated' method for model selection at each iteration of the simulation.
The cv.glmnet function in the same package is handy for that purpose.
However, in my simulation I have p >> N, and in some cases the selected
model from cv.glmet is essentially shrinking all coefficients to zero. In
this case,
2010 Dec 08
1
the output of function lars
Hi here is the code as example
lars is in package lars
> x<-matrix(rnorm(20*5,0,1),20,5)
> bs<-matrix(sample(seq(1:10),5),5,1)
> er<-rnorm(20,0,1)
> y<-x%*%bs+er
> lobj<-lars(x,y,type="lasso")
> names(lobj)
[1] "call" "type" "df" "lambda" "R2"
[6] "RSS"
2009 Mar 17
1
Double Cross validation for LASSO
Dear R user,
I am looking for a code on double cross validation in
LASSO , one for optimizing the parameter and other one is for MSEP. If any
one have it, please foroward to me. I am using different package like LARS,
chemometric etc.
Thanks in advance
Alex
[[alternative HTML version deleted]]
2011 May 28
1
Questions regrading the lasso and glmnet
Hi all. Sorry for the long email. I have been trying to find someone local to work on this with me, without much luck. I went in to our local stats consulting service here, and the guy there told me that I already know more about model selection than he does. :-< He pointed me towards another professor that can perhaps help, but that prof is busy until mid-June, so I want to get as much
2018 Feb 27
2
scale.default gives an incorrect error message when is.numeric() fails on a sparse row matrix (dgeMatrix)
I am attempting to use the lars package with a sparse input feature matrix,
but the following fails:
library(Matrix)
library(lars)
data(diabetes)
attach(diabetes)
x = as(as.matrix(as.data.frame(x)), 'dgCMatrix')
lars(x, y, intercept = FALSE)
Error in scale.default(x, FALSE, normx) :
>
> length of 'scale' must equal the number of columns of 'x'
>
>
More
2010 Aug 03
1
Penalized Gamma GLM
Hi,
I couldn't find a package to fit a penalized (lasso/ridge) Gamma regression
model. Does anybody know any?
Thanks in advance,
Lars.
[[alternative HTML version deleted]]
2009 Oct 27
1
lasso plot using LARS
When plotting a lars object, I cannot find a way to plot solid lines.
Even when the arguments breaks=F and lty="solid" are used, the vertical
lines at the break points do not plot but asterisks indicating the
breaks still plot as part of each path leaving solid lines broken up by
asterisks at the break points. I'm using the following code.
larsfit <-
2006 Sep 15
2
LARS for generalized linear models
Hi,
Is there an R implementation of least angle regression for binary response
modeling? I know that this question has been asked before, and I am also
aware of the "lasso2" package, but that only implements an L1 penalty, i.e.
the Lasso approach.
Madigan and Ridgeway in their discussion of Efron et al (2004) describe a
LARS-type algorithm for generalized linear models. Has
2013 Nov 29
1
Lasso function that can handle NA values
Hi everyone,
I have a large dataset with missing values. I tried using glmnet, but it seems that it cannot handle NA values in the design matrix. I also tried lars, but I get an error too. Does anyone know of any package for computing the lasso solution which handles NA values?
2013 Jul 06
1
problem with BootCV for coxph in pec after feature selection with glmnet (lasso)
Hi,
I am attempting to evaluate the prediction error of a coxph model that was
built after feature selection with glmnet.
In the preprocessing stage I used na.omit (dataset) to remove NAs.
I reconstructed all my factor variables into binary variables with dummies
(using model.matrix)
I then used glmnet lasso to fit a cox model and select the best performing
features.
Then I fit a coxph model