Skip to content

R-beta: standard-errors-glm

3 messages · Helgi Tomasson, Thomas Lumley, Bill Venables

#
I have a small problem.  I am running glm() in R-0.61.0 on Redhat 4.2.
I want to get the standard errors from the output.  If I do

out <- glm(....)
summary(out)

I get the coefficients printed as well as their correlation matrix.  If I do 

out$coefficients  I get the coefficients
out$fitted        gives me the fitted values

I can then assign the fitted values or the value of the estimated coefficients
to a variable.  How do I get the covariance matrix of the estimates?

I have tried out$R but that gives me a matrix with numbers I don't understand.

Sorry to bug you with such a simple problem.

Helgi Tomasson
#
On Sat, 4 Apr 1998, Helgi Tomasson wrote:

            
Use
	summary(mymodel)$coefficients[,2]

This returns the second column of the table of coefficients, standard
errors, and t values  that is produced by summary.glm


Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Helgi Tomasson writes:

 > out <- glm(....)
 > summary(out)

 > I want to get the standard errors from the output.
> How do I get the covariance matrix of the estimates?
If you want several things from the summary it is less
computation to create the object once and then extract them.
.
 .
 .
Also
gives a good idea what else is buried in the summary object.
Remember that when you print an object you don't necessarily see
everything that is there.  (This is a feature, not a bug!)