Greetings, I have recently been exploring the 'glmnet' package and subsequently cv.glmnet. The basic code as follows:
model <- cv.glmnet(variables, group, family="multinomial", alpha=.5, standardize=F) I understand that cv.glmnet does k-fold cross-validation to return a value of lambda. However, sometimes when I follow up the cv.glmnet to extract the coefficients either very few or all are zero. If I understand this correctly, it means that there aren't very many (if any) variables to separate the groups. Despite this, I would like to provide a list of variables and rank them in terms of importance (even if not discriminatory as this is for some simulation purposes and not working on a particular question/experiment). Is there a way for my to set up the analysis to provide a user determined number of variables? Or perhaps another way, is it possible to determine the order with which variables are dropped from the model? Best regards, -- Charles Determan Integrated Biosciences PhD Candidate University of Minnesota [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.