[R] R-help Digest, Vol 31, Issue 9
Wuming Gong
wuming.gong at gmail.com
Sat Sep 10 10:40:45 CEST 2005
?summary.lm and check the Value section.
Wuming
On 9/10/05, Ping Yao <sdshlxh at gmail.com> wrote:
> 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]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list