Hi,

for example one could do it this way:

v <- summary(fit)$coefficients[,4]

the coefficient attribute is a matrix, and with the "4" you refere to the
pvalue (at least in lm - don't know if summary(glm) produces sligthely
different output).

to skip the intercept (1st row): v <- summary(glmfit)$coefficients[-1,4]

        hope this helps,

        Arne

--
Arne Muller, Ph.D.
Toxicogenomics, Aventis Pharma
arne dot muller domain=aventis com

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Roy Sanderson
> Sent: 06 April 2004 14:36
> To: [EMAIL PROTECTED]
> Subject: [R] Storing p-values from a glm
> 
> 
> Hello
> 
> I need to store the P-statistics from a number of glm 
> objects.  Whilst it's
> easy to display these on screen via the summary() function, 
> I'm not clear
> on how to extract the P-values and store them in a vector.
> 
> Many thanks
> Roy
> 
> --------------------------------------------------------------
> --------------
> Roy Sanderson
> Centre for Life Sciences Modelling
> Porter Building
> University of Newcastle
> Newcastle upon Tyne
> NE1 7RU
> United Kingdom
> 
> Tel: +44 191 222 7789
> 
> [EMAIL PROTECTED]
> http://www.ncl.ac.uk/clsm
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to