search for: lar

Displaying 20 results from an estimated 1220 matches for "lar".

Did you mean: bar
2011 Dec 06
1
Can't load package 'lars'
Hi, I installed package 'lars' earlier tonight and did not get any sort of error message. ### ** building package indices ... ** testing if installed package can be loaded Loaded lars 0.9-8 * DONE (lars) ### However, when I try to load it, I get ### > library(lars, lib.loc = "~/R/x86_64-redhat-linux-gnu-librar...
2013 Mar 19
1
Lars package
Hi,   I'm using lars package to run some regression analysis and my doubt now is how can I predict my model to another dataset? Let me explain a little better: I have a dataset from which I withhold some data. With the data that wasn't withheld, I create the model. Now, what I'm not being able to do is apply t...
2005 May 31
3
lars / lasso with glm
We have been using Least Angle Regression (lars) to help identify predictors in models where the outcome is continuous. To do so we have been relying on the lars package. Theoretically, it should be possible to use the lars procedure within a general linear model (glm) framework - we are particular interested in a logistic regression model....
2007 Jun 12
1
LASSO coefficients for a specific s
Hello, I have a question about the lars package. I am using this package to get the coefficients at a specific LASSO parameter s. data(diabetes) attach(diabetes) object <- lars(x,y,type="lasso") cvres<-cv.lars(x,y,K=10,fraction = seq(from = 0, to = 1, length = 100)) fits <- predict.lars(object, type="coeffic...
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 pro...
2007 Aug 21
2
Optimization problem
Hello Folks, Very new to R so bear with me, running 5.2 on XP. Trying to do a zero-inflated negative binomial regression on placental scar data as dependent. Lactation, location, number of tick larvae present and mass of mouse are independents. Dataframe and attributes below: Location Lac Scars Lar Mass Lacfac 1 Tullychurry 0 0 15 13.87 0 2 Somerset 0 0 0 15.60 0 3 Tollymore 0 0 3 16.43 0 4 Tollymore 0 0 0 16.55 0 5...
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'...
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" "lamb...
2012 Jun 16
0
Selecting correlated predictors with LASSO
I'm using the package 'lars' in R with the following code: > library(lars) > set.seed(3) > n <- 1000 > x1 <- rnorm(n) > x2 <- x1+rnorm(n)*0.5 > x3 <- rnorm(n) > x4 <- rnorm(n) > x5 <- rexp(n) > y <- 5*x1 + 4*x2 + 2*x3 + 7*x4 + rnorm(n) > x <- cbind(x1,x2,x3,x4,x5) &g...
2004 Jul 21
2
Rose Diagrams
Hi, Is it possible to create Rose Diagrams of wind data (speed & direction) with R?? Best regards, Lars Peters ----- Lars Peters University of Konstanz Limnological Institute D-78457 Konstanz Germany phone: +49 (0)7531 88-2930 fax: +49 (0)7531 88-3533 e-mail: Lars.Peters@Uni-Konstanz.de web: Lars Peters <http://www.uni-konstanz.de/sfb454/tp_eng/A1/doc/peters/peters.html> Zoobenthos gro...
2003 Jun 13
1
lars - lasso problem
hello I tried to use lars() but neither with my own data nor with the sample data it works. I get in both cases the following error prompt: > data(diabetes) > par(mfrow=c(2,2)) > attach(diabetes) > x<-lars(x,y) Error in one %*% x : requires numeric matrix/vector arguments > x<-lars(x,y, type="...
2009 Jul 22
1
Question about the lars package
Hello, I have a question about lars package, probably basic. The returned values of lars function include R squares along the variable selection path. However, such values are always slightly different from the R squares returned by the regression function lm using the same models. Anyone know the reasons? Very important, and ne...
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 point...
2007 Nov 23
1
intercept in lars fit
I am trying to extract coefficients from lars fit and can't find how to get intercept. E.g. y = rnorm(10) x = matrix(runif(50),nrow=10) X = data.frame(y,x) fit1 = lars(as.matrix(X[,2:6]),as.matrix(X[,1])) fit2 = lm(y~.,data=X) Then, if I do: > predict(fit1,s=1,mode='fraction',type='coefficients')$coef X1...
2010 Apr 26
1
Problem with 'lars' package
Hi, I'm having trouble running 'lars'. When I install it I get the following warning: >install.packages('lars') Warning in install.packages("lars") : argument 'lib' is missing: using 'C:\Users\Anna\Documents/R/win-library/2.10' --- Please select a CRAN mirror for use in this session --- try...
2013 May 04
2
Lasso Regression error
...equired). Having renamed the variables as l,g,h and u, I wish to run a Lasso Regression with l as the dependent variable and all the other 3 as the independent variables. data=read.table("data.txt", header=T) l=data$LOSS h=data$HPI u=data$UE g=data$GDP matrix=data.frame(l,g,h,u) lasso=lars(matrix,l) But R is throwing an error (shown below) at this: Error in rep(1, n) : invalid 'times' argument Can you kindly suggest where I went wrong? [Just wanted to mention that I am getting the same error when instead of the matrix of predictor variables, I am using only a single var...
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 hacked the lars() function to print out the zmin, gamhat, and also z1 values (used to calculate zm...
2009 Nov 04
1
s4 generic issue
...TRUE, ...) base::backsolve(r, x, k = ncol(r), upper.tri = TRUE, transpose = FALSE, ...)) and then proceed to use setMethod for a class matrix.csr.chol. However, this seems to cause problems in the following instance: if one does the following require(lars) require(SparseM) example(lars) ....[snip] lars> object3 <- lars(x,y,type="for") # Can use abbreviations Error in base::backsolve(r, x, k = ncol(r), upper.tri = TRUE, transpose = FALSE, : NA/NaN/Inf in foreign function call (arg 4) > traceback() 10: .C("bakslv",...
2005 Jun 08
1
A question about lars
Hi, I am trying to use lars on my data. After getting the model and did the prediction, I compare the predicted value and the coefficients and it seems like there should be a constant term in the model. I have gone through the documentation of the lars package and I can't seem to find how to get this piece of information...
2008 Oct 23
1
lars
I am trying to use the lars package in R to carry out lasso analysis. However, I am having some problems. Please could you help me with the following questions: 1) Exactly what format do x and y need to be in for cv.lars(x, y) and lars (x, y)? And what information do x and y need to contain exactly? I have tried using to...