Displaying 20 results from an estimated 3000 matches similar to: "The l1ce function in lasso2: The bound and absolute.t parameters."
2005 Feb 11
1
Help concerning Lasso::l1ce
Hi,
First, when I try the example Prostate with bound 0.44
(as in the manual), I got a different result:
> l1c.P <- l1ce(lpsa ~ ., Prostate, bound=0.44)
> l1c.P
....
Coefficients:
(Intercept) lcavol lweight age
lbph svi
1.0435803 0.4740831 0.1953156 0.0000000
0.0000000 0.3758199
lcp gleason pgg45
0.0000000 0.0000000
2003 Dec 08
1
trouble with predict.l1ce
Dear R-help,
I am having trouble with the predict function in lasso2. For example:
> data(Iowa)
> l1c.I <- l1ce(Yield ~ ., Iowa, bound = 10, absolute.t=TRUE)
> predict (l1c.I) # this works is fine
> predict (l1c.I,Iowa)
Error in eval(exper,envir, enclos) : couldn't find function "Yield"
And I have similar trouble whenever I use the newdata argument in
2012 Mar 27
2
lasso constraint
In the package lasso2, there is a Prostate Data. To find coefficients in the
prostate cancer example we could impose L1 constraint on the parameters.
code is:
data(Prostate)
p.mean <- apply(Prostate, 5,mean)
pros <- sweep(Prostate, 5, p.mean, "-")
p.std <- apply(pros, 5, var)
pros <- sweep(pros, 5, sqrt(p.std),"/")
pros[, "lpsa"] <-
2007 Jul 25
1
question on using "gl1ce" from "lasso2" package
Hi,
I tried several settings by using the "family=gaussian"
in "gl1ce", but none of them works.
For the case "glm" can work.
Here is the error message I got:
> glm(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length
,data=iris,family=gaussian())
> gl1ce(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length
,data=iris,family=gaussian())
Error in eval(expr, envir,
2007 Nov 09
1
help with lasso2 package
X is a matrix and F is a vector.
F2 <- data.frame(cbind(X,F))
F2
V1 V2 V3 F
1 -0.250536332 -1.4755883 1.9580974 -2.136487
2 -0.009856084 0.4953269 0.5486092 -2.744482
3 -0.406962682 0.7729631 0.1861905 -2.891821
4 1.938780097 0.7469251 1.2537781 -1.212992
5 -0.332370358 1.1943637 0.7114278 -1.830441
modF<-formula(F ~ V1 + V2 + V3) #no error message
2003 Dec 04
2
predict.gl1ce question
Hi,
I'm using gl1ce with family=binomial like so:
>yy
succ fail
[1,] 76 23
[2,] 32 67
[3,] 56 43
...
[24,] 81 18
>xx
c1219 c643
X1 0.04545455 0.64274145
X2 0.17723669 0.90392792
...
X24 0.80629054 0.12239320
>test.gl1ce <- gl1ce(yy ~ xx, family = binomial(link=logit), bound =
0.5 )
or
>omit <- c(2,3)
>test.gl1ce
2007 May 18
0
Cross-validation for logistic regression with lasso2
Hello, I am trying to shrink the coefficients of a logistic regression for a
sparse dataset, I am using the lasso (lasso2) and I am trying to determine
the shrinkinage factor by cross-validation. I would like please some of the
experts here to tell me whether i'm doing it correctly or not. Below is my
dataset and the functions I use
w=
a b c d e P A
0 0 0 0 0 1 879
1 0 0 0 0 1 3
0 1 0 0 0 7 7
2010 Jun 27
1
Dual nw card problem again
I have had problems like this before. Probably there is something
important that I don't know about routing.
Let me introduce to you "Lasso2", a CentOS 4 www server that has been
working perfectly well for years.
Now I added a second nw card (eth1), automatically using kudzu. I cannot
get this dual nw setup to work. The first nw card (eth0) stopped at once
working properly,
2011 May 17
5
Feed a list of filenames to vim
There are some googlable ways to feed a list of filenames to vim, but I
stumble on weird results.
With my filelist, I try to do
cat list | xargs vim
...to edit the files listed in the file "list". Here's what happens:
[root at lasso2 tempdir]# ls -l
total 8
-rw-r--r-- 1 root root 0 May 17 18:28 a
-rw-r--r-- 1 root root 0 May 17 18:28 b
-rw-r--r-- 1 root root 3 May 17
2003 Jul 13
3
How to install a package
Dear R community:
My platform: R 1.7.0 + windows2000.
I am trying to install the package "lasso2" which I saw in the following web address: http://cran.us.r-project.org/src/contrib/PACKAGES.html#emplik. However, I failed to install it from R menu "Packages| Install package(s) from CRAN" since I
could not find this item in the list.
Thanks in advance!
Rui
[[alternative
2003 Jul 13
3
How to install a package
Dear R community:
My platform: R 1.7.0 + windows2000.
I am trying to install the package "lasso2" which I saw in the following web address: http://cran.us.r-project.org/src/contrib/PACKAGES.html#emplik. However, I failed to install it from R menu "Packages| Install package(s) from CRAN" since I
could not find this item in the list.
Thanks in advance!
Rui
[[alternative
2007 Apr 12
1
Question on ridge regression with R
Hi,
I am working on a project about hospital efficiency. Due to the high
multicolinearlity of the data, I want to fit the model using ridge
regression. However, I believe that the data from large hospital(indicated
by the number of patients they treat a year) is more accurate than from
small hosptials, and I want to put more weight on them. How do I do this
with lm.ridge?
I know I just need
2007 Oct 02
0
Variable selection in R
Disclaimer : Short of having local statistical expertise at hand, I'm using
this list because I use R for variable selection in the context of linear
multiple regression but the questions I have relate more to basic statistics
than to R per se. Please redirect me to another appropriate list if such a
list exists.
I have the very common problem of identifying which (subset of) variables
are
2006 May 09
1
Question about match.fun()
Dear all,
I was recently contacted by a user about an alledged problem/bug in
the latest version of lasso2. After some investigation, we found out
that it was a user error which boils down to the following:
> x <- matrix(rnorm(200), ncol=2)
> var <- "fred"
> apply(x, 2, var)
Error in get(x, envir, mode, inherits) : variable "fred" of mode "function"
2005 Jun 20
2
Fwd: How to sample from a linear mixed model
Thanks. I wonder if there is a general way of extracting var(u) and var(e), which would be needed to simulate u and e. Clearly, one can get the estimated parameters, but is there a clever way of 'setting up' the matrices??
Best
S??ren
On 6/19/05, S??ren H??jsgaard <Soren.Hojsgaard at agrsci.dk> wrote:
> I would like to draw a sample from a linear mixed model y=Xb+Zu+e which has
2004 May 11
1
How to use c routines in the exiting package?
Hi all,
I want to know some details about the c routine “lasso” in the functions
of “gl1ce()” . However, I have following troubles. First, I can not
find the routine in the local directories of this function (or package).
Second, if I found the routine, could I call it just like this way, say,
fit <- .C("lasso", …,PACKAGE = "lasso2") in my own functions. My system
is
2006 Aug 18
2
apply least angle regression to generalized linear models
Hello list,
I've been searching around trying to find whether somebody has written such
a package of least angle regression on generalized linear models, like what
Lasso2 package does. The extension to generalized linear models is briefly
discussed in the comment by D. Madigan and G. Ridgeway. Is such a package
available? Thanks,
Mike
[[alternative HTML version deleted]]
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
2005 Jun 19
1
How to sample from a linear mixed model
I would like to draw a sample from a linear mixed model y=Xb+Zu+e which has been fitted with lme(), i.e. a model y ~ N(Xb, C), where C=Z cov(u) Z' + cov(e).
I've tried to figure out how to extract C from an lme object, because that would solve my problem when also using the predict() function, but without any luck.
Can anyone help on that?
2005 Nov 04
1
small bug in gl1ce, package lasso2 (PR#8280)
Full_Name: Grant Izmirlian
Version: 2.2.0
OS: SuSe Linux version 9.2
Submission from: (NULL) (156.40.34.177)
Sorry about the last submission, my bug-fix had an error in it because ifelse
doesn't vectorize. I'll repost with the correct bug-fix.
-------------------------------------------------------------------------------
The option exists to include all parameters, including the