similar to: A question on glmnet analysis

Displaying 20 results from an estimated 4000 matches similar to: "A question on glmnet analysis"

2011 May 01
1
Different results of coefficients by packages penalized and glmnet
Dear R users: Recently, I learn to use penalized logistic regression. Two packages (penalized and glmnet) have the function of lasso. So I write these code. However, I got different results of coef. Can someone kindly explain. # lasso using penalized library(penalized) pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="logistic",standardize=TRUE) pena.fit2
2012 May 28
0
GLMNET AUC vs. MSE
Hello - I am using glmnet to generate a model for multiple cohorts i. For each i, I run 5 separate models, each with a different x variable. I want to compare the fit statistic for each i and x combination. When I use auc, the output is in some cases is < .5 (.49). In addition, if I compare mean MSE (with upper and lower bounds) ... there is no difference across my various x variables, but
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
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
2011 Aug 10
2
glmnet
Hi All,  I have been trying to use glmnet package to do LASSO linear regression. my x data is a matrix n_row by n_col and y is a vector of size n_row corresponding to the vector data. The number of n_col is much more larger than the number of n_row. I do the following: fits = glmnet(x, y, family="multinomial")I have been following this
2011 Jul 22
4
glmnet with binary logistic regression
Hi all, I am using the glmnet R package to run LASSO with binary logistic regression. I have over 290 samples with outcome data (0 for alive, 1 for dead) and over 230 predictor variables. I currently using LASSO to reduce the number of predictor variables. I am using the cv.glmnet function to do 10-fold cross validation on a sequence of lambda values which I let glmnet determine. I then take
2011 Sep 21
1
glmnet for Binary trait analysis
Hello, I got an error message saying Error in lognet(x, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : NA/NaN/Inf in foreign function call (arg 5) when I try to analysis a binary trait using glmnet(R) by running the following code library(glmnet) Xori <- read.table("c:\\SNP.txt", sep='\t'); Yori <- read.table("c:\\Trait.txt", sep=',');
2010 Jun 02
2
glmnet strange error message
Hello fellow R users, I have been getting a strange error message when using the cv.glmnet function in the glmnet package. I am attempting to fit a multinomial regression using the lasso. covars is a matrix with 80 rows and roughly 4000 columns, all the covariates are binary. resp is an eight level factor. I can fit the model with no errors but when I try to cross-validate after about 30 seconds
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,
2008 Dec 17
1
glmnet : Error in validObject(.Object) :
Could any one help ? I start to learn the glmnet package. I tried with the example in the manual. x=matrix(rnorm(100*20),100,20) y=rnorm(100) fit1=glmnet(x,y) When I tried to fit the model, I received the error message: Error in validObject(.Object) : invalid class "dgCMatrix" object: row indices are not sorted within columns Thank you very much!
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
2011 Jun 23
1
gcc-4.5.2 and install.packages("glmnet")?
Hi, is there any chance to install glmnet with gcc-4.5.2? For me it fails on all systems with: trying URL 'http://mirrors.softliste.de/cran/src/contrib/glmnet_1.7.tar.gz' Content type 'application/x-gzip' length 522888 bytes (510 Kb) opened URL ================================================== downloaded 510 Kb * installing *source* package ?glmnet? ... This package has only
2010 Jul 31
1
Feature selection via glmnet package (LASSO)
Hello, I'm trying to select features of cetain numbers(like 100 out of 1000) via LASSO, based on multinomial model, however, it seems the glmnet package provides a very sparse estimation of coefficients(most of coefficients are 0), which selects very few number of variables, like only 10, based on my easy dataset. I try to connect the choice of lambda to the selecting
2017 Dec 20
1
Nonlinear regression
You also need to reply-all so the mailing list stays in the loop. -- Sent from my phone. Please excuse my brevity. On December 19, 2017 4:00:29 PM PST, Timothy Axberg <axbergtimothy at gmail.com> wrote: >Sorry about that. Here is the code typed directly on the email. > >qe = (Qmax * Kl * ce) / (1 + Kl * ce) > >##The data >ce <- c(15.17, 42.15, 69.12, 237.7, 419.77)
2008 Jan 05
1
Likelihood ratio test for proportional odds logistic regression
Hi, I want to do a global likelihood ratio test for the proportional odds logistic regression model and am unsure how to go about it. I am using the polr() function in library(MASS). 1. Is the p-value from the likelihood ratio test obtained by anova(fit1,fit2), where fit1 is the polr model with only the intercept and fit2 is the full polr model (refer to example below)? So in the case of the
2011 Oct 06
1
anova.rq {quantreg) - Why do different level of nesting changes the P values?!
Hello dear R help members. I am trying to understand the anova.rq, and I am finding something which I can not explain (is it a bug?!): The example is for when we have 3 nested models. I run the anova once on the two models, and again on the three models. I expect that the p.value for the comparison of model 1 and model 2 would remain the same, whether or not I add a third model to be compared
2009 Jul 28
2
A hiccup when using anova on gam() fits.
I stumbled across a mild glitch when trying to compare the result of gam() fitting with the result of lm() fitting. The following code demonstrates the problem: library(gam) x <- rep(1:10,10) set.seed(42) y <- rnorm(100) fit1 <- lm(y~x) fit2 <- gam(y~lo(x)) fit3 <- lm(y~factor(x)) print(anova(fit1,fit2)) # No worries. print(anova(fit1,fit3)) # Likewise. print(anova(fit2,fit3)) #
2011 Jan 26
2
Extracting the terms from an rpart object
Hello all, I wish to extract the terms from an rpart object. Specifically, I would like to be able to know what is the response variable (so I could do some manipulation on it). But in general, such a method for rpart will also need to handle a "." case (see fit2) Here are two simple examples: fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) fit1$call fit2 <-
2004 Dec 20
2
problems with limma
I try to send this message To Gordon Smyth at smyth at vehi,edu.au but it bounced back, so here it is to r-help I am trying to use limma, just downloaded it from CRAN. I use R 2.0.1 on Win XP see the following: > library(RODBC) > chan1 <- odbcConnectExcel("D:/Data/mgc/Chips/Chips4.xls") > dd <- sqlFetch(chan1,"Raw") # all data 12000 > # > nzw <-
2009 Apr 08
2
Null-Hypothesis
Hello R users, I've used the following help two compare two regression line slopes. Wanted to test if they differ significantly: Hi, I've made a research about how to compare two regression line slopes (of y versus x for 2 groups, "group" being a factor ) using R. I knew the method based on the following statement : t = (b1 - b2) / sb1,b2 where b1 and b2 are the two slope