similar to: glmnet with binary predictors

Displaying 20 results from an estimated 1000 matches similar to: "glmnet with binary predictors"

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 Feb 01
2
Preparing dataset for glmnet: factors to dummies
Hello list. For some reason, the makers of glmnet do not accept a dataframe as input. They expect the input to be a matrix, where the dummies are already precoded. Now I have created a sample dataset with . 11 factor columns with two levels . 4 factor columns with three levels . 135 continuous columns (from a standard normal) . 100 observations (rows) Say this dataframe is in dfrPredictors. What
2011 Mar 25
2
A question on glmnet analysis
Hi, I am trying to do logistic regression for data of 104 patients, which have one outcome (yes or no) and 15 variables (9 categorical factors [yes or no] and 6 continuous variables). Number of yes outcome is 25. Twenty-five events and 15 variables mean events per variable is much less than 10. Therefore, I tried to analyze the data with penalized regression method. I would like please some of the
2009 Oct 14
1
different L2 regularization behavior between lrm, glmnet, and penalized?
The following R code using different packages gives the same results for a simple logistic regression without regularization, but different results with regularization. This may just be a matter of different scaling of the regularization parameters, but if anyone familiar with these packages has insight into why the results differ, I'd appreciate hearing about it. I'm new to
2011 Oct 27
1
Problem Installing a local package in linux
Dear all, I am "still" fairly new to R and newer still to linux (opensuse). I want to install a package called "FEAR" from "http://www.clemson.edu/economics/faculty/wilson/Software/FEAR/fear-download.html". So, I downloaded the tar.gz file called "FEAR-linux-64bit-2.6.16.60-0.21-smp.tar.gz" and it is in the directory "/home/sambit/Downloads"
2011 Jan 28
1
plot not generic
Hello list. I was trying to see some of the code for plot.glmnet in package glmnet (this function name is in the documentation). After loading the library, I tried the obvious typing in the name, but I received a message telling me it could not be found. So I fiddled around a little, and noticed that R does not recognize ''plot'' as a generic function, and as such,
2011 Sep 22
1
R check error / update.packages
While building/checking a package of mine that depends on glmnet, I got the following message: * checking whether the name space can be loaded with stated dependencies ...Warn ing: running command ''"C:/Users/nisabbe/Documents/R/R-2.13.1/bin/i386/Rterm.exe" R_DEFAULT_PACKAGES=NULL --vanilla --slave -f C:\Users\nisabbe\AppData\Local\Tem p\RtmpZpjj07\Rin121ae93''
2012 Jun 01
1
Dependencies on recommended packages
Dear all, I've recently had some issues getting my package to successfully "check". This was on R-Forge, so it's not obvious for me to provide SessionInfo or the likes (if necessary, Stefan can chime in?). After some research (mainly by Stefan Theussler, driving force behind R-Forge), this turned out to be the root cause: On R-Forge, the version of R installed was the
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,
2011 Oct 25
1
Glmnet Logistic Variable Questions
We are workin on building a logistic regression using 1. We are doing a logistic regression with binary outcome variable using a set of predictors that include 8 continuous and 8 category predictors 2. We are trying to implement interaction between two variables (continuous and category or just continuous) The dataset is 200,000 rows and we are using glmnet, how can we model those two points ?
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
2010 Jul 08
1
glmnet - choosing the number of features
Hi, I am trying to use the glmnet package to do some simple feature selection. However, I would ideally like to be able to specify the number of features to return (the glmnet package, as far as I can tell, only allows specification of a regularization parameter, lambda, that in turn returns a model with a specific number of non-zero features). Is there a straightforward way of calculating the
2010 Aug 20
1
How to make 'step' faster?
Dear all, I am fairly new to R. I would like to perform a step-wise logit regression aiming to select a model on the basis of AIC. I am using some large datasets (up to a million rows and 97 variables). It is taking the 'step' function just too long to complete a single routine. Now, I have tried subsetting the data and perform the same thing. But, 'step' is time consuming still.
2013 Dec 07
1
combine glmnet and coxph (and survfit) with strata()
Dear All, I want to generate survival curve with cox model but I want to estimate the coefficients using glmnet. However, I also want to include a strata() term in the model. Could anyone please tell me how to have this strata() effect in the model in glmnet? I tried converting a formula with strata() to a design matrix and feeding to glmnet, but glmnet just treats the strata() term with one
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
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 Feb 17
1
cv.glmnet errors
Hi, I am trying to do multinomial regression using the glmnet package, but the following gives me an error (for no reason apparent to me): library(glmnet) cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6), nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomial',alpha=0.5, nfolds=2) The error i get is: Error in if (outlist$msg != "Unknown error") return(outlist) : argument is of
2011 Apr 13
2
glmnet
Hello, I?m trying to in install the package 'glmnet' but I get always the error massage "package ?Matrix? is not available". I search on you site, but I coundn?t find the package there either. Is their still a package called "Matrix"? Or how can I use "glmnet"? Thank You in advance. Kind regards J.Hemmersbach
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
2009 Apr 24
1
Can't install package "glmnet"
Hi, I was trying to install package glmnet in R, but failed and it show such messages: * Installing *source* package glmnet ... This package has only been tested with gfortran. So some checks are needed. R_HOME is /home/username/R/R-2.9.0 Attempting to determine R_ARCH... R_ARCH is Attempting to detect how R was configured for Fortran 90.... Unsupported Fortran 90 compiler or Fortran 90