Re: [R] matrix (column-wise) multiple regression

2007-11-23 Thread Gabor Grothendieck
You can look at the components of the output using str and pick out what you want using $ and attr. idx <- 1:2 z <- lm(as.matrix(iris[idx]) ~., iris[-idx]) str(z) str(summary(z)) On Nov 23, 2007 1:10 PM, Morgan Hough <[EMAIL PROTECTED]> wrote: > Hi Gabor, > > Thanks for your reply. I have it work

Re: [R] matrix (column-wise) multiple regression

2007-11-23 Thread Morgan Hough
Hi Gabor, Thanks for your reply. I have it working now. A couple of follow-ups if I may. I have a shell script parsing the output to find the brain areas where there is a significant effect of diagnosis but its a bit of a hack. I was wondering whether there are R specific tools for parsing/sum

Re: [R] matrix (column-wise) multiple regression

2007-11-23 Thread Gabor Grothendieck
Perhaps something like this: > idx <- 1:2 > lm(as.matrix(iris[idx]) ~., iris[-idx]) Call: lm(formula = as.matrix(iris[idx]) ~ ., data = iris[-idx]) Coefficients: Sepal.Length Sepal.Width (Intercept) 3.682982 3.048497 Petal.Length0.905946 0.154676 Pet

[R] matrix (column-wise) multiple regression

2007-11-23 Thread Morgan Hough
Hi there, I am analyzing a table of brain volume measures where each brain area (183 of them) is a column with a label and volume values. I have another table of explanatory variables (age, gender, diagnosis and IntraCranialVol) that I have been using to model the brain volume differences. I h