search for: alexroy2008

Displaying 20 results from an estimated 20 matches for "alexroy2008".

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]]
2010 Jan 13
4
How can I store the results
Dear R users, I am running a R code which gives me 10 columns and 160 rows. I need to run the code for 100 times and each time I need to store the results in a single file. I do not know how can I store them in a single file without over writting the results? Thanks Alex [[alternative HTML version deleted]]
2009 Jun 13
2
How to write loop
Dear all, I want to do the following process as a loop ( to run automatically with dimension of X, here 50). How can I do that? Your cooments will be highly appreciable. Alex *# Code:* library(lars) library(chemometrics) X<-matrix(rnorm(2500),ncol=50) dim(X) # [1] 50 50 X1<-X[,2:dim(X)[2]] # I have taken out first column dim(X1) #[1] 50 49 X2<-X1[2:dim(X1)[1],] #
2009 Jun 08
2
Heatmap
Hello Group, How can I draw heatmap with variable names in the plot? Thanks Alex [[alternative HTML version deleted]]
2009 Aug 04
1
Rank of matrix
Dear all, Rank of a matrix depends on which factors? Only on rows or coumns? or both ? If there is a collinearlity in the variables ( columns ) does it effects the rank? > X<-matrix((rnorm(10000)),50) > dim(X) [1] 50 200 > qr(X)$rank [1] 50 > X[,2]<-X[,30] > qr(X)$rank [1] 50 > X[10,]<-X[7,] > qr(X)$rank [1] 49 Thanks Alex [[alternative HTML
2009 Feb 24
2
Leave one out Cross validation (LOO)
Dear R user, I am working with LOO. Can any one who is working with leave one out cross validation (LOO) could send me the code? Thanks in advance Alex [[alternative HTML version deleted]]
2009 Jul 21
2
Collinearity in Linear Multiple Regression
Dear all, How can I test for collinearity in the predictor data set for multiple linear regression. Thanks Alex [[alternative HTML version deleted]]
2009 Aug 25
1
Elastic net in R (enet package)
Dear R users, I am using "enet" package in R for applying "elastic net" method. In elastic net, two penalities are applied one is lambda1 for LASSO and lambda2 for ridge ( zou, 2005) penalty. But while running the analysis, I realised tht, I optimised only one lambda. ( even when I looked at the example in R, they used only one penality) So, I am
2009 May 05
1
self organizing map advice for categorical data
...arge-dataset---tp23364526p23366862.html Sent from the R help mailing list archive at Nabble.com. ------------------------------ Message: 13 Date: Mon, 4 May 2009 09:27:05 -0400 From: Max Kuhn <mxkuhn at gmail.com> Subject: Re: [R] Caret package: coeffcients for regression To: Alex Roy <alexroy2008 at gmail.com> Cc: r-help at r-project.org Message-ID: <6731304c0905040627i387cf645i905423007b24b14f at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Alex, > I am using "Caret"package for SVM regression and elastic net > regression . I can get the final fii...
2009 Apr 02
0
Sparse PCA problem
Dear R user, I want to do sparse principal component analysis (spca). I am using elastic net package for this and spca() and the code is following from the example. My question is How can I decide the *K =? *and *para=c(7,4,4,1,1,1)) . So, here k=6 i.e the no of Principal Components. and each pcs say , * ** pc1 number of non zero loading is 7 pc2 number of non zero loading
2009 Jun 19
1
How to save multiple images??
Dear all, How can I save multiple images in my working directory?? I used save.image() but could not succeeded. Thanks in advance Alex [[alternative HTML version deleted]]
2009 Jul 14
1
Linear Regression Problem
Dear All, I have a matrix say, X ( 100 X 40,000) and a vector say, y (100 X 1) . I want to perform linear regression. I have scaled X matrix by using scale () to get mean zero and s.d 1 . But still I get very high values of regression coefficients. If I scale X matrix, then the regression coefficients will bahave as a correlation coefficient and they should not be more than 1.
2010 Jan 25
0
glmnet in caret packge
Dear all, I want to train my model with LASSO using caret package (glmnet). So, in glmnet, there are two parameters, alpha and lambda. How can I fix my alpha=1 to get a lasso model? con<-trainControl(method="cv",number=10) model <- train(X, y, "glmnet", metric="RMSE",tuneLength = 10, trControl = con) Thanks Alex Roy [[alternative HTML
2009 Feb 15
0
PRESS / RMSEP
Dear all , I want to do PRESS (prediction error sums of squares) or the residual mean square error of prediction (RMSEP) which will give me value that is valid for 'future predictions of independent data'. I am using different methods for example, Multiple Linear Regression, LASSO regression, Ridge Regression, Elastic Net regression etc. I am wandering if there are
2009 Feb 20
0
e1071 package for SVM
Dear all, I got a code for e1071 package in R for SVM regression. I have used *m$coefs* for extracting the coefficients but I am getting only 72 . How can I extract coefficients of the predictors set? Does it mean that I will get only 72 as *Number of Support Vectors: 72. * ** Thanks in advance Code: -------------- library(e1071) > # create data > x <- seq(0.1, 5,
2009 Mar 17
1
Double Cross validation for LASSO
Dear R user, I am looking for a code on double cross validation in LASSO , one for optimizing the parameter and other one is for MSEP. If any one have it, please foroward to me. I am using different package like LARS, chemometric etc. Thanks in advance Alex [[alternative HTML version deleted]]
2009 May 04
1
Caret package: coeffcients for regression
Dear All, I am using "Caret"package for SVM regression and elastic net regression . I can get the final fiited vs observed values. How can I get the coefficients? Any ideas? Thanks Alex [[alternative HTML version deleted]]
2009 Aug 14
1
Permutation test and R2 problem
Hi, I have optimized the shrinkage parameter (GCV)for ridge and got my r2 value is 70% . to check the sensitivity of the result, I did permutation test. I permuted the response vector and run for 1000 times and draw a distribution. But now, I get r2 values highest 98% and some of them more than 70 %. Is it expected from such type of test? *I was under impression that, r2 with real data set
2010 May 25
1
PRESS and P2 statistics in R
Hello all, Is there any function in R by which I can calculate PRESS and P2 statistics for linear regression in R? Thanks Alex [[alternative HTML version deleted]]
2009 Apr 05
2
loop problem for extract coefficients
Dear R users, I have problem with extracting coefficients from a object. Here, X (predictor)and Y (response) are two matrix , I am regressing X ( dimensions 10 x 20) on each of columns of Y[,1] (10 x 1) and want to store the coefficient values. I have performed a Elastic Net regression and I want to store the coeffcients in each iteration. I got an error message . I do not