February 3, 2020

Inroduction

The app fits the regression model on the subset of mtcars dataset that is an R build in dataset.

The MpG variable is used as the outcome and the weight variable is used as the regressor.

The user can subset mtcars by either number of cylinders or transmission type or both.

Motivation

Mtcars is a well-known and well-studied dataset. It is also well established that the weight is one of the best predictors of mpg.

##              Estimate Std. Error   t value     Pr(>|t|)
## (Intercept) 37.285126   1.877627 19.857575 8.241799e-19
## wt          -5.344472   0.559101 -9.559044 1.293959e-10
## [1] "Adjusted R Squared: 0.744593886780206"

However the dependence of mpg on weight may differ for different types of cars. And it may be interesting to see what that difference is. This app is designed to answer that question.

Description

The left pane allows user to select the cars with certain number of cylinders only. The option of selecting all cars is also available.

It also allows to select the cars with certain type of transmission. Like "Auto" or "Manual". Selection of both types is also available.

The right pane produces the reactive output which consists of the graph of data points and the fitted regression line and the numeric characteristics of that line, i.e. the intercept and the slope.

Example

For instance if we select 8-cylinder cars only with automatic transmission only the app will return the following output:

## [1] "Intercept: 25.0594237740004" "Slope: -2.43889389201822"