similar to: how to get a value from a list (using paste function)?

Displaying 20 results from an estimated 5000 matches similar to: "how to get a value from a list (using paste function)?"

2011 Apr 14
2
How to see a R code from a package?
Dear R users, Hi. I want know R code of a function: predict.cv.glmnet (which is included in glmnet package). Could you let me know how I can see the R code of the function? Thank you, Soyeon Kim
2011 Aug 10
2
Opposite of paste function
Dear All, I have vn variable > vn [1] "V300" "V376" What I want to get is 300 376 without V and "" from vn variable. Could you help me about this issue? Thank you, Soyeon [[alternative HTML version deleted]]
2010 Dec 13
2
How to change leaf color by group in hclust plot or how to install A2R package in windows?
I want to change leaf color by group in hclust plot. I've seen several answers about A2R package but I cannot install A2R and Rtools in windows. Do you know how to install A2R package in windows or how to change leaf color by group in hclust plot? Thank you in advance, Soyeon
2010 Sep 20
2
how to seperate " "? or how to do regression on each variable when I have multiple variables?
Dear All, I have data which contains 14 variables. And I have to regress one of variables on each variable (simple 13 linear regressions) I try to make a loop and store only R-squared colnames(boston) [1] "CRIM" "ZN" "INDUS" "CHAS" "NOX" "RM" "AGE" [8] "DIS" "RAD"
2011 Apr 15
2
prediction error in ROCR package when sampled y consists of only one class
Dear R users, Hi. I am using prediction function in ROCR package. y consists of two classes 0 and 1. However, since I am using cross-validation, a sampled small number of y may consist of only one class >y [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 In this case, prediction function gives an error: Error in prediction(predic, y) : Number of classes is not equal to 2. ROCR currently supports
2010 Nov 17
1
Multiple plots in one window
Dear All, I made a function which gives 3 plots in one window(I used par(mfrow=c(1,3)) in the function). Using that function 3 times, I want to produce 9 plots in one window. I tried par(mfrow=c(3,1)) or par(mfrow=c(3,3)) but it didn't work. For example, pf <- function(p) { par(mfrow=c(1,3)) plot(c(p:(p+10)),c(1:11)) plot(c(p:(p+10)),c(2:12)) plot(c(p:(p+10)),c(3:13)) } p <-
2011 Jun 09
4
set.seed and for loop
Dear All, This is hard to describe so I made a simple example. set.seed(1001) total <- 0 data <- vector("list", 30) for(i in 1:30) { data[[i]] <- runif(50) } Let's call a data set runif(50). While the for loop is running, 100 data sets are generated. I want to restore 23th data set (the data set generated in 23th for loop) without the loop. I've tried set.seed(1023)
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,
2004 Jan 20
1
random forest question
Hi, here are three results of random forest (version 4.0-1). The results seem to be more or less the same which is strange because I changed the classwt. I hoped that for example classwt=c(0.45,0.1,0.45) would result in fewer cases classified as class 2. Did I understand something wrong? Christian x1rf <- randomForest(x=as.data.frame(mfilters[cvtrain,]),
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 May 24
1
seeking help on using LARS package
Hi, I am writing to seek some guidance regarding using Lasso regression with the R package LARS. I have introductory statistics background but I am trying to learn more. Right now I am trying to duplicate the results in a paper for shRNA prediction "An accurate and interpretable model for siRNA efficacy prediction, Jean-Philippe Vert et. al, Bioinformatics" for a Bioinformatics project
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
2012 Jul 04
2
How to generate a correlated binary data set?
Hi. I am trying to generate a correlated binary data set. I've tried to use mvtBinaryEP, binarySimCLF, and bindata packages but none of them works in R version 2.15.1. Do you know any package to generate correlated binary covariates and work in R version 2.15.1, or how to generate it? Thanks, [[alternative HTML version deleted]]
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 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 Mar 21
2
glmnet: obtain predictions using predict and also by extracting coefficients
All, For my understanding, I wanted to see if I can get glmnet predictions using both the predict function and also by multiplying coefficients by the variable matrix. This is not worked out. Could anyone suggest where I am going wrong? I understand that I may not have the mean/intercept correct, but the scaling is also off, which suggests a bigger mistake. Thanks for your help. Juliet Hannah
2011 Aug 23
1
Glmnet lambda value choice
Hi, When using the glmnet() function of the package glmnet, A series of coefficients is returned for a list of descending lambda values. I am unable to locate anything in the documentation that explains HOW this choice of lambda series is made. (There is documentation about how to choose my own, but I want to understand how the authors are doing it) Any ideas? -- Noah Silverman UCLA
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
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