[R] Storing p-values from a glm

Arne.Muller@aventis.com Arne.Muller at aventis.com
Tue Apr 6 14:05:27 CEST 2004


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: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Roy Sanderson
> Sent: 06 April 2004 14:36
> To: r-help at stat.math.ethz.ch
> 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
> 
> r.a.sanderson at newcastle.ac.uk
> http://www.ncl.ac.uk/clsm
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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




More information about the R-help mailing list