Re: [R] vectorizing ANOVA over a vectorized linear model

2011-08-14 Thread DonPrice
Hi Mark, I am interested in doing what you are asking about. Did you figure out an easy way to do this. I am interested in performing many two and more factor anova on a dataframe. I am still a little new to R but I know enough to get me this far. thanks Don -- View this message in contex

Re: [R] vectorizing ANOVA over a vectorized linear model

2010-03-07 Thread hadley wickham
Hi Mark, Unless you are fitting millions of very very very simple models, I doubt that extracting p-values is going to be a limiting factor in the speed of your analysis. Hadley On Mon, Mar 8, 2010 at 3:47 AM, Mark Kimpel wrote: > Hadley, > > Thanks for pointing me to some good articles. Unfort

Re: [R] vectorizing ANOVA over a vectorized linear model

2010-03-07 Thread Mark Kimpel
Hadley, Thanks for pointing me to some good articles. Unfortunately, I have already read Holger's and my main concern is computational efficiency. The buzzword on this list regarding efficient code is "vectorization". I am, frankly, surprised that there is a way to vectorize analysis of complex mo

Re: [R] vectorizing ANOVA over a vectorized linear model

2010-03-07 Thread hadley wickham
Hi Mark, If efficiency is a concern you might want to read "Computing Thousands of Test Statistics Simultaneously in R" by Holger Schwender and Tina Müller, http://stat-computing.org/newsletter/issues/scgn-18-1.pdf. If you just want to do it, see the examples in http://had.co.nz/plyr/plyr-intro-0

Re: [R] vectorizing ANOVA over a vectorized linear model

2010-03-07 Thread Dieter Menne
Mark Kimpel wrote: > > Is it possible to vectorize anova over the output of a vectorized lm? > library(nlme) fm1 <- lmList(distance ~ age | Subject, Orthodont) lapply(fm1,anova) Dieter -- View this message in context: http://n4.nabble.com/vectorizing-ANOVA-over-a-vectorized-linear-model

[R] vectorizing ANOVA over a vectorized linear model

2010-03-07 Thread Mark Kimpel
Is it possible to vectorize anova over the output of a vectorized lm? I have a gene expression matrix with each row being a gene and columns for samples. There are several factors with interactions. I can get p values by looping over the matrix with lm and anova, but I would like to make this as c