2025-01-11

Introduction

MTCARS Analyzer is a Shiny App to predict MPG based on car parameters.

Its main features are:

  • Linear Regression plot
  • Prediction based on a value of X
  • 3D scatterplot for exploratory purposes
  • Interactive regeneration of charts

DISCLAIMER: Please do not rely on this app for your next car purchase.

Main UI

Here is a screenshot of the input form.

.

How to use?

  • You can choose X, Y, Z axis variables on the left side panel. 3D Scatterplot will update.
  • For linear regression model choose X, Y variables where Y is dependent variable X is an independent variable. The single-variable regression plot will update accordingly.
  • To predict a Y value based on a value of X use the numeric box for X. The result is indicated with a large red marker.
  • To simulate errors in real-life distributions change the value of error input box. The predicted Y value is randomly increased or decreased. If error is 0, the predicted value follows strictly on the regression line.

Statistical model

Here is a basic code to show the regression modelling

Conclusion

If you use this app you can predict MPG based on car weight for learning purposes. Thank you!