[R] the output of function lars
poko2000
quan.poko2000 at gmail.com
Wed Dec 8 17:02:04 CET 2010
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" "actions" "entry" "Gamrat"
[11] "arc.length" "Gram" "beta" "mu" "normx"
[16] "meanx"
I do not know what does RSS, arc.length, mu mean???
If mu means \hat{miu}, it does not seems to be right. I did not simulate my
data with mean.
besides I caculated R2 by myself but it cannot match the R2here
I think R2=1-sum((y-x%*%lobj$beta)^2)/var(y)*19 #I have 20 observations...my
R2 is lower than the one here
Thanks a lot
--
View this message in context: http://r.789695.n4.nabble.com/the-output-of-function-lars-tp3078460p3078460.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list