Young Cho wrote:
> I am trying to extract coefficients from lars fit and can't find how to get
> intercept. E.g.
Are we talking about the function lars() from package "lars"?
> y = rnorm(10)
> x = matrix(runif(50),nrow=10)
> X = data.frame(y,x)
> fit1 = lars(as.matrix(X[,2:6]),as.matrix(X[,1]
I am trying to extract coefficients from lars fit and can't find how to get
intercept. E.g.
y = rnorm(10)
x = matrix(runif(50),nrow=10)
X = data.frame(y,x)
fit1 = lars(as.matrix(X[,2:6]),as.matrix(X[,1]))
fit2 = lm(y~.,data=X)
Then, if I do:
> predict(fit1,s=1,mode='fraction',type='coefficients')
2 matches
Mail list logo