similar to: lars / lasso with glm

Displaying 20 results from an estimated 5000 matches similar to: "lars / lasso with glm"

2006 Jan 05
4
ylim problem in barplot
R Version 2.2.0 Platform: Windows When I use barplot but select a ylim value greater than zero, the graph is distorted. The bars extend below the bottom of the graph. For instance the command produces a problematic graph. barplot(c(200,300,250,350),ylim=c(150,400)) Any help would be appreciated. Paul [[alternative HTML version deleted]]
2005 Sep 09
2
Simulate phi-coefficient
Looking for help with the following problem. Given a sample of zeros and ones, for example: > VECTOR1<-rep(c(1,0),c(15,10)) > VECTOR1 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 How would I create a new sample (VECTOR2) also containing zeros and ones, in which the phi-coefficient between the two sample vectors was drawn from a population with a known
2006 Aug 24
2
Why are lagged correlations typically negative?
Recently, I was working with some lagged designs where a vector of observations at one time was used to predict a vector of observations at another time using a lag 1 design. In the work, I noticed a lot of negative correlations, so I ran a simple simulation with 2 matched points. The crude simulation example below shows that the correlation can be -1 or +1, but interestingly if you do this
2005 May 26
2
read.spss in R 2.1.0 & make basic dataframe
Recent changes to read.spss() in the foreign package return a dataframe containing additional attributes. For example, >TEMP<-read.spss(choose.files(), to.data.frame=T,use.value.labels=F) > str(TEMP) `data.frame': 780 obs. of 8 variables: $ EXPOS01: atomic 1 1 2 1 2 3 2 4 2 1 ... ..- attr(*, "value.labels")= Named num 5 4 3 2 1 .. ..- attr(*,
2006 Jun 28
1
Simulate dichotomous correlation matrix
Newsgroup members, Does anyone have a clever way to simulate a correlation matrix such that each column contains dichotomous variables (0,1) and where each column has different prevalence rates. For instance, I would like to simulate the following correlation matrix: > CORMAT[1:4,1:4] PUREPT PTCUT2 PHQCUT2T ALCCUTT2 PUREPT 1.0000000 0.5141552 0.1913139 0.1917923 PTCUT2
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 Jan 24
1
mcnemar.test odds ratios, CI, etc.
Does anyone know of another version of the Mcnemar test that provides: 1. Odds Ratios 2. 95% Confidence intervals of the Odds Ratios 3. Sample probability 4. 95% Confidence intervals of the sample probability Obviously the Odds Ratios and Sample probabilities are easy to calculate from the contingency table, but I would appreciate any help on how to calculate the confidence
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
2005 Sep 27
1
Simulate phi-coefficient (correlation between dichotomous vars)
Newsgroup members, I appreciate the help on this topic. David Duffy provided a solution (below) that was quite helpful, and came close to what I needed. It did a great job creating two vectors of dichotomous variables with a known correlation (what I referred to as a phi-coefficient). My situation is a bit more complicated and I'm not sure it is easily solved. The problem is that I must
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 <-
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="lasso") Error in one %*% x : requires numeric matrix/vector arguments
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
2005 May 31
1
apply the function "factor" to multiple columns
I have a case where I would like to change multiple columns containing numbers to factors. I can change each column one at a time as in: TEMP.FACT$EXPOS01<-factor(TEMP.FACT$EXPOS01,levels=c(1,2,3),labels=c("No ne","Low Impact","MedHigh Imp")) TEMP.FACT$EXPOS02<-factor(TEMP.FACT$EXPOS02,levels=c(1,2,3),labels=c("No ne","Low
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]]
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
2006 Mar 23
1
gam y-axis interpretation
Sorry if this is an obvious question... I'm estimating a simple binomial generalized additive model using the gam function in the package mgcv. The model makes sense given my data, and the predicted values also make sense given what I know about the data. However, I'm having trouble interpreting the y-axis of the plot of the gam object. The y-axis is labeled "s(x,2.52)"
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
2006 Aug 14
1
lasso for variable selection
For "importance" it's probably best to stick with absolute values of coefficients, instead of value of the penalty parameter for which the coefficients changed to non-zero. Friedman skipped a lot of details on his rule ensemble in that talk, due to time constraint. In his implementation he was using his own algorithm, PathSeeker, for which paper and software are available on his
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
2009 Feb 17
3
Subset Regression Package
Dear all , Is there any subset regression (subset selection regression) package in R other than "leaps"? Thanks and regards Alex [[alternative HTML version deleted]]