[R] Extract Standard Errors of Model Coefficients

Axel Urbiz axel.urbiz at gmail.com
Tue Dec 29 15:09:39 CET 2015


Is it possible to extract or compute the standard errors of model coefficients from a glm.fit object? This can be easily done from a fitted glm object, but I need glm.fit.

n <- 100
x <- rnorm(n)
y1 <- rnorm(n)
y2 <- rbinom(n, 1, .25)

M1 <- glm (y1 ~ x)
M2 <- glm.fit(x = x, y = y1)
seCoef <- sqrt(diag(vcov(M1)))

(Intercept)           x 
 0.09698729  0.10772703 

Thank you,

More information about the R-help mailing list