Displaying 20 results from an estimated 6000 matches similar to: "lars - lasso problem"
2004 Oct 28
1
qustion with lars (lasso) package
Dear All,
I am using lars package written by Dr. Trevor Hastie, the version is lars_0.9-5 downloaded from cran. When I ran the diabetes example data attached in package, I found that the beta outputs from different machines are different. The difference is only about 10^-11 to 10^-12, some friends suggested that it possibly is a machine precision problem. But I check the machine numerical
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 <-
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="coefficients", s=0.1, mode="fraction")
Can I assign
2003 Oct 06
4
Apply and its friends
Hi,
Forgive a very basic question...
I need to take two lists-of-lists, and apply a function to each pair of elements in the lists to return a single list...
For example
l1 <- list(1:5,6:10,2:15)
l2 <- list(1:8,4:12,1:19,4:20)
I could easily do an lapply across each of them, but is there a function that does a sort-of pairwise-apply across both together?
Does anybody know of a good
2009 Apr 27
2
The .tex version of the manual in foo.Rcheck
In version 2.8.1, running Rcmd check on the package foo would leave the file foo-manual.tex in the folder foo.Rcheck.
But as of 2.9.0 only foo-manual.pdf and foo-manual.log are there.
Is this intentional?
Anyway it is inconvenient, because I would occasionally like to include the manual at the end of a set of exercises, and this was a convenient file to \input with a few select %'s added.
2002 Oct 28
1
RFC: no automatic updates of packages with major version chan ge
Is it possible to have a slightly more elaborate description, such as:
BackwardCompatibleTo: x.x-x
and if the new version is _not_ backward compatible, this would be the
current version number?
Just my $0.02...
Andy
-----Original Message-----
From: Torsten Hothorn [mailto:Torsten.Hothorn@rzmail.uni-erlangen.de]
Sent: Monday, October 28, 2002 7:25 AM
To: ripley@stats.ox.ac.uk
Cc:
2005 Jul 13
2
Kronecker matrix product
Hi
I want to write a little function that takes a matrix X of size
m-by-n, and a list L of length "m", whose elements are matrices all
of which have
the same number of columns but possibly a different number of rows.
I then want to get a sort of dumbed-down kronecker product in which
X[i,j] is replaced by X[i,j]*L[[j]]
where L[[j]] is the j-th of the "m" matrices. For
2005 Dec 02
3
extracting rows of a dataframe
Hi
look at the following session, in which I have a dataframe,
and I want to extract the second row, without the first column.
Everything works as expected until the last line, where I set
the names of x to NULL, and get a non-desired object (I
want c(4,3).).
Three questions:
(1) why is as.vector(a[2,-1]) not a vector?
(2) How come setting names to NULL gives me bad weirdness?
(3) Can I
2006 Feb 18
3
Bug in Sweave? -- scoping problem? (PR#8615)
I have found a strange scoping problem in Sweave. The following Rnw
file doesn't produce the same output in Sweave as it does if I produce
an R file using Stangle and execute that:
\documentclass[12pt]{article}
\begin{document}
<<R>>=
election <- data.frame(A=1:3, B=9:7, C=rep(0,3))
partytotal <- rep(0, ncol(election))
for (i in 1:ncol(election)) {
partytotal[i] <-
2008 Jun 03
1
some problems I have met in LARS
Hi:
I loaded the LARS package,and input: data(diabetes),load the embedded
data
then I found the varialbes are in this form:
x.age,x.bmi......(10 of them),X2.age,X2.bmi....(64 of them)
When I input x,R gave me all 10 varialbes,and input X2,it gave me 64
variables,but if I input x.age,it returned nothing,I wonder how to affiliate
those subvariable such as x.age,x.bmi to x,since I
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
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]]
2010 Apr 01
2
pdf files in loops
I need to make a bunch of PDF files of histograms. I tried
gatelist = unique(mdf$ArrivalGate)
for( gate in gatelist) {
outfile = paste("../", airport, "/", airport, "taxiHistogram", gate,
".pdf", sep="")
pdf(file = outfile, width = 10, height=8, par(lwd=1))
title=paste("Taxi time for Arrival Gate", gate, "by
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. Does
anyone have examples of using lars with logistic
2007 Jan 06
0
has anyone implemented LARS with the "positive lasso"?
Hi,
I am interested in a modification to LARS that allows for positive-only
constraints in the variables (with details about how to implement this as
described in section 3.4 of the Efron et al (2003) LARS paper).
Before I dive into the "lars" package code myself, I was wondering if anyone
knew of a version where this is available, or if another package that I have
not found can do
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
2003 Aug 21
1
R is mentioned on Linux Today
Hi all,
people who don't follow Linux Today regularly may want to check out:
http://linuxtoday.com/developer/2003082000626OSSVDV
My apologies if this is considered spam.
Cheers,
Berwin
========================== Full address ============================
Berwin A Turlach Tel.: +61 (8) 9380 3338 (secr)
School of Mathematics and Statistics +61
2003 Jun 12
2
car package dependencies
Hello,
I tried to install the "car" package but I can't solve the dependencies. car
needs grid, lattice and dr but when I try to install grid I get this error
prompt:
wz3x64:/home/oggi/R/software/contrib # rpm -i R-car-1.0.R3-1.i386.rpm
error: failed dependencies:
R-grid is needed by R-car-1.0.R3-1
R-lattice is needed by R-car-1.0.R3-1
2010 Jul 20
1
Call to rgamma using .C causes R to hang
Hi,
I've been trying to get this working for ages, but it causes R to hang.
Here is my C code saved as test1.c
# include <R.h>
# include <Rmath.h>
void test1 (double *x, double *result)
{
result[0] = rgamma(*x, 2.0);
}
This was compiled using R CMD SHLIB test1.c & loaded in R using:
dyn.load("test1.dll")
out <-
2006 Mar 14
1
Internal codes of the factor
Hello!
I am writing some functions and I repeatedly acces internal factor
codes. I figured out that internal codes are 1:n where 1 represents 1st
level, 2 2nd level etc. This is not documented and I wonder if this is
on purpose and subject to change or would be a good idea to add this to
documentation for factor? I can prepair a pacth if this is accepted.
--
Lep pozdrav / With regards,