This site is to serve as my note-book and to effectively communicate with my students and collaborators. Every now and then, a blog may be of interest to other researchers or teachers. Views in this blog are my own. All rights of research results and findings on this blog are reserved. See also http://youtube.com/c/hongqin @hongqin
Friday, May 31, 2013
Loop over all columns for exploratory regression analysis in R
### all possible regression analysis for a given column
pTb = 1: length(tb[1,])
names(pTb) = names(tb)
for( j in c(2:15,17:34) ) {
m = lm( tb[, j] ~ tb$Cv.vs.Cb)
sm = summary(m)
pTb[j] = 1 - pf(sm$fsta[1], sm$fsta[2], sm$fsta[3])
}
pTb[pTb<0.05]
pTb[pTb<0.05]
ARLS Lmax L0.all CLS.vs.Tc Cv.vs.Cb Cb.vs.Cv
3.546097e-02 3.877701e-02 3.137392e-02 4.748623e-02 0.000000e+00 7.306331e-05
Cb.vs.Cv.mean
5.729385e-04
Labels:
protocol,
R,
regression
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment