Re: [R] regression analysis in R

2012-10-27 Thread eliza botto
many days now. reply like yours, simply wont help. anyway, thanks for your advice. eliza > Date: Fri, 26 Oct 2012 16:36:27 -0700 > From: ehl...@ucalgary.ca > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] regression analysis in R > > On 2012

Re: [R] regression analysis in R

2012-10-26 Thread Peter Ehlers
On 2012-10-26 13:00, eliza botto wrote: Dear useRs, i have vectors of about 27 descriptors, each having 703 elements. what i want to do is the following 1. i want to do regression analysis of these 27 vectors individually, against a dependent vector, say B, having same number of elements.2. i

Re: [R] regression analysis in R

2012-10-26 Thread Rui Barradas
Hello, Using the same example, at the end, add the following lines to have the models ordered by AIC. aic <- lapply(res2, AIC) idx <- order(unlist(aic)) lapply(list1[idx], names) And if there are more than 10 models, if you want the 10 best, best10 <- idx[1:10] lapply(list1[best10], names)

Re: [R] regression analysis in R

2012-10-26 Thread arun
HI, May be this helps. set.seed(8) mat1<-matrix(sample(150,90,replace=FALSE),ncol=9,nrow=10) dat1<-data.frame(mat1) set.seed(10) B<-sample(150:190,10,replace=FALSE) res1<-lapply(dat1,function(x) lm(B~as.matrix(x))) #or res1<-lapply(dat1,function(x) lm(B~x)) res1Summary<-lapply(res1,summary) #to g