Hi,
I'm not aware of a way to do this without some looping/applying, but this
should do the trick:
x <- 1:10
y <- rnorm(100,x,0.5)
dim(y) <- c(10,10)
mod <- lm(y~x)
do.call(rbind,lapply(summary(mod),function(x) coefficients(x)[,4]))
This will give you the p values/model
Bart
Mark W Kimpel
I have fit a model to ~20k different genes and would now like to extract the
p-val for one of the effects, again for each individual gene.
My model code is:
mod <- lm(myResponseMatrix~ Time)
Were I to do this with a response vector rather than matrix, the following
would work:
anovaResult<- anova
2 matches
Mail list logo