[R] extracting P values from lm model

2010-11-29 Thread Rosario Garcia Gil
Hello

I am trying to get out of an lm model the fstatistics, however after I run the 
model I write 
 names(Model)

and the fstatistic does not appear only these.

names(Model)
 [1] coefficients  residuals effects   rank  
fitted.values
 [6] assignqrdf.residual   xlevels   call 

[11] terms model  

How could I extract the P values? I have run a cbind of 1800 response variables 
so is not easy to do it by hand.

Thanks in advance.
Rosario
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] extracting P values from lm model

2010-11-29 Thread David L Lorenz
Rosario,
 The summary function will compute the f-statistic, from which you can 
compute the attained p-value. Here's a snippet that shows the f-stat.

summary(lm(Y ~ X))$fstatistic
   valuenumdfdendf 
34.23125  1.0  8.0 

Dave



From:
Rosario Garcia Gil m.rosario.gar...@genfys.slu.se
To:
r-help r-help@r-project.org
Date:
11/29/2010 09:30 AM
Subject:
[R] extracting P values from lm model
Sent by:
r-help-boun...@r-project.org



Hello

I am trying to get out of an lm model the fstatistics, however after I run 
the model I write 
 names(Model)

and the fstatistic does not appear only these.

names(Model)
 [1] coefficients  residuals effects   rank 
fitted.values
 [6] assignqrdf.residual   xlevels call  
[11] terms model 

How could I extract the P values? I have run a cbind of 1800 response 
variables so is not easy to do it by hand.

Thanks in advance.
Rosario
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.