knitr::opts_chunk$set(
  collapse = TRUE, message=FALSE, warning=FALSE,
  comment = "#>"
)

In this analysis, we'll develop a model for predicting fuel efficiency from car characteristics using the auto_mpg data frame.

Model fitting is normally an iterative process. We'll skip this to keep things simple.

Fit the model

library(qacReg)
data(auto_mpg)

fit <- lm(mpg ~ ., data = auto_mpg)

# or
# fit <- regress(mpg ~ ., data = auto_mpg)

Examine the model

info(fit)

Perform regression diagnostics

diagnostics(fit)

Visualize the model parameters

forest_plot(fit)
me_plots(fit)

Evaluate variable importance

relimp(fit)

Assess predictive performance

performance(fit)


Rkabacoff/qacReg documentation built on Aug. 1, 2022, 11:11 p.m.