Duncan Murdoch <[EMAIL PROTECTED]> writes: > On Tue, 06 Apr 2004 12:35:39 +0000, Roy Sanderson > <[EMAIL PROTECTED]> wrote : > > >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. > > Generally when summary() functions display something, they also return > it as part of their value. > > In the case of summary() for glm objects, the table of coefficients > (including estimates, std error, z value, and p value) is returned as > a matrix in summary(glm.object)$coefficients. You can extract the > p-values as > > summary(glm.object)$coefficients[,4]
An alternative and, I think, a preferred form is coef(summary(glm.object)) Someone writing a summary method for another class of fitted model objects may not want to include a component called coefficients but can certainly implement a coef method. ______________________________________________ [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
