[R] Accesing glm results
Thomas Lumley
tlumley at u.washington.edu
Wed Feb 6 18:31:06 CET 2002
On Wed, 6 Feb 2002, iago mosqueira wrote:
> Hi,
>
> I want to generate sdome vectors with results from glm(), for later
> processing. How can I extract the t values and the associated p values? I
> suppose something starting with summary(g)$...
>
The answer is
summary(g)$coef[,3:4]
The way to find out things like this is to use names() or str() to look at
the glm and summary.glm objects.
summ<-summary(g)
names(summ)
# I see a coefficients item. I wonder what it looks like
summ$coefficients
# That looks familiar, it's the table of coefficients, std erros,
#p-values. I want the last two columns
summ$coefficients[,3:4]
#Success
Or alternatively, read print.summary.glm() to see where it gets them from.
-thomas
Thomas Lumley Asst. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list