[R] the output of function lars

2010-12-08 Thread poko2000
Hi here is the code as example lars is in package lars > x<-matrix(rnorm(20*5,0,1),20,5) > bs<-matrix(sample(seq(1:10),5),5,1) > er<-rnorm(20,0,1) > y<-x%*%bs+er > lobj<-lars(x,y,type="lasso") > names(lobj) [1] "call" "type" "df" "lambda" "R2" [6] "RSS""Cp

[R] how to do linear regression when dimension is high

2010-11-16 Thread poko2000
Hi I am a newbie in R. I have data with dim of 20. How to use lm if i want to do regression with the whole design matrix? My y is the first column. the left are xs. Thanks a lot. -- View this message in context: http://r.789695.n4.nabble.com/how-to-do-linear-regression-when-dimension-is-high-tp