Information from lm() Model Output

Learn how to get information from lm() model output.

What information can we get from lm() model output?

# estimate OLS model and create output object
model1 <- lm(logy  ̃ open + loglab + logland, data=final.85)
 # understand the nature of model output
names(model1) class(model1) mode(model1)
#request various estimation output # anova table and results anova(model1)
 # model coefficients
coefficients(model1)
 # confidence interval of coefficient estimates, 95% and 99%
confint(model1) confint(model1, level=0.99)
 # covariance matrix for model coefficient estimates
vcov(model1)
# Other useful functions
# list predicted values of the fitted model fitted(model1)
 # list residuals of the fitted model
residuals(model1)
 # use fitted model to get predicted y
predict(model1)

Get hands-on with 1400+ tech skills courses.