Alex Roy [Sun, Jun 14, 2009 at 06:43:52AM CEST]:
> Hi Jiim, Thanks . I want to do the following:
>
> 1. each time I need to drop one column, say first column 1 from matrix X.
> 2 then take out row 1 of the remainning matrix and that row becomes
> response (y)
> 3. do lasso regression on remain
Hi Jiim, Thanks . I want to do the following:
1. each time I need to drop one column, say first column 1 from matrix X.
2 then take out row 1 of the remainning matrix and that row becomes
response (y)
3. do lasso regression on remaining X to y.
4. store the coefficients
Similarly, in next run
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[,
3 matches
Mail list logo