Thomas Petzoldt <[EMAIL PROTECTED]> writes:

> umeno wrote:
> 
> > I would like to know if anyone has any idea of how to extract
> > Std.Error from the regression output.  I know how to extract
> > coefficients, but I could not figure out how to retrieve
> > std. error...
> 
> 
> Given a model like this
> 
> model <- lm(y~x)
> 
> first analyse the data structure of the summary() with
> 
> str(summary(model))
> 
> looking into this, the following (or something similar for the other
> values) should work:
> 
> summary(reg)$coefficients[,2]

It would be better form to use
  coef(summary(reg))[, 2]
or even
  coef(summary(reg))[, "Std. Error"]

It is safer to use extractor functions like coef() than to rely on the
object returned by summary having components with particular names.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to