Hi:
I use lm (linear model) to analyze 47 variables , 8 responses
So I use loop to finish it .
I want the program to show the results that P-value is less than 0.05.
How can I cite the P-valus from lm result ?
Ping
The code:
#using LM to model general fati
for (j in 48:52) {
for (i in 3:46){
gen.fat<-y_x[,j]
gen.fat<-as.numeric(gen.fat)
snp_marker<-y_x[,i]
x<-colnames(y_x)
#snp_marker<-as.matrix(snp_marker)
#mode(snp_marker)
cat("phenotype is = ",x[j] , "\n")
cat("snp marker is = ",x[i] , "\n")
zz<-summary(lm.D9 <- lm(gen.fat~snp_marker))
print(zz)
return
}
}
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html