We got a lm object from and want to extract the standard error
The output of from the
summary function is just an R list. So you can use all the standard list operations. For example:
#some data (taken from Roland's example) x = c(1,2,3,4) y = c(2.1,3.9,6.3,7.8) #fitting a linear model fit = lm(y~x) m = summary(fit)
m object or list has a number of attributes. You can access them using the bracket or named approach:
A handy function to know about is,
str. This function provides a summary of the objects attributes, i.e.